-
Notifications
You must be signed in to change notification settings - Fork 110
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
BF: read RIA config from stdin instead of temporary file #7147
Conversation
as outlined in a comment by @bpoldrack in the code, git config -f - can read from stdin. This is supported by git as its a unix convention. Trial and error confirms that this also runs successfully in a Windows CMD. By switching to a git config call with stdin as the input file, we spare the need to write a temporary config file. This fix could thus fix datalad#6514, where a user error lead to a non-existent TMP path and a subsequent failure to create the temporary config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks double-checking with git, @adswa !
Note to myself: This will need some rectification in |
Codecov ReportBase: 88.38% // Head: 88.53% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7147 +/- ##
==========================================
+ Coverage 88.38% 88.53% +0.15%
==========================================
Files 355 355
Lines 46517 49307 +2790
Branches 0 6232 +6232
==========================================
+ Hits 41112 43655 +2543
- Misses 5405 5620 +215
- Partials 0 32 +32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
note: benchmarks error are likely unrelated -- filed #7149 |
PR released in |
A RIA postclone config hook tried to read a special remote UUID from a stores config file by writing the config files contents to a temporary config file, and subsequently running
git config -f <thatfile>
. As outlined in a comment by @bpoldrack in the code,git config -f -
can read from stdin:A quick chat in the Git IRC channel hinted that this is supported by git as its a unix convention. Trial and error confirms that this patch also runs successfully in a Windows CMD. I'll rely on the tests on MacOS to check if it runs there successfully, too. By switching to a git config call with stdin as the input file, we spare the need to write a temporary RIA config file. This fix could thus fix #6514, where a user error lead to a non-existent TMP path and a subsequent failure to create the temporary config file.