Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why If --file or --sync-dir is set, the other must also be set? #235

Open
Araxeus opened this issue Feb 17, 2023 · 0 comments · May be fixed by #236
Open

Why If --file or --sync-dir is set, the other must also be set? #235

Araxeus opened this issue Feb 17, 2023 · 0 comments · May be fixed by #236

Comments

@Araxeus
Copy link

Araxeus commented Feb 17, 2023

  • Why can't I just input --file and then the sync dir will automatically be the parent of the file

  • Why can't I just input --sync-dir and then the file getting logic will be as usual?

If there isn't some particular reason not to change this behavior, it should pretty easy to do here:

peru/peru/runtime.py

Lines 70 to 79 in 9dbf098

if explicit_peru_file and explicit_sync_dir:
self.peru_file = explicit_peru_file
self.sync_dir = explicit_sync_dir
elif explicit_peru_file or explicit_sync_dir:
raise CommandLineError('If the --file or --sync-dir is set, '
'the other must also be set.')
else:
basename = explicit_basename or parser.DEFAULT_PERU_FILE_NAME
self.peru_file = find_project_file(os.getcwd(), basename)
self.sync_dir = os.path.dirname(self.peru_file)

I'm willing to give it a go myself if I get a go ahead

@Araxeus Araxeus changed the title Why If the --file or --sync-dir is set, the other must also be set.? Why If --file or --sync-dir is set, the other must also be set? Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant