This repository was archived by the owner on Apr 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 153
Issue 824 relative paths in cli #833
Merged
ggalmazor
merged 4 commits into
getodk:master
from
ggalmazor:issue_824_relative_paths_in_CLI
Nov 20, 2019
Merged
Issue 824 relative paths in cli #833
ggalmazor
merged 4 commits into
getodk:master
from
ggalmazor:issue_824_relative_paths_in_CLI
Nov 20, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We will ensure the storage directory is absolute in the arg mapper
We will use the user.dir property (the directory where the java command was launched) to resolve the arg's value if it's a relative path
We will use it in other path input args too
@chrissyhroberts, this PR should take care of relative paths in any CLI arg that takes filesystem paths: storage dir, export dir, pem file path, and the odk dir when pulling from Collect. I've attached a new JAR in case you want to give it a try. |
lognaturel
approved these changes
Nov 20, 2019
I've tested this and it seems to work with v.1.17.0
with new no errors Checked can rebuild Ubuntu |
Testes with success! @opendatakit-bot unlabel "needs testing" |
@opendatakit-bot label "behavior verified" |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #824
Test it with this JAR: briefcase_p833.zip
What has been done to verify that this works as intended?
-sd
argWhy is this the best possible solution? Were any other approaches considered?
Intercepting the value users provide as the storage directory while parsing CLI args feels like the smallest possible change and probably the safest place to do it.
Another approach would be to patch the particular place where the error was being produced, but that wouldn't get us rid of other similar undiscovered problems in other parts of the codebase.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
The change will allow users to provide relative paths in the CLI. It shouldn't have unexpected behavior changes for users double-clicking the JAR file or manually launching the GUI from the shell, since the GUI always works with absolute paths.
Does this change require updates to documentation? If so, please file an issue at https://github.com/opendatakit/docs/issues/new and include the link below.
Nope.