-
-
Notifications
You must be signed in to change notification settings - Fork 29
Ability to set tmpdir to false to disable using temp directory #276
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
Conversation
| return | ||
| } | ||
|
|
||
| fs.move(tempPath, finalPath, function (err) { |
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.
fs-extra handles EPERM on windows correctly. We don't need to use mkdirp/ncp here explicitly.
|
Is this ready for review now? I don't want to merge this before you're ready (again). |
| if (args.tmpdir === 'false') { | ||
| args.tmpdir = false | ||
| } | ||
|
|
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.
Should add a comment that minimist doesn't do this for us. I almost forgot why this conditional was added.
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.
Please also add documentation to readme.md and usage.txt about this new functionality to tmpdir. Though you may want to hold off on that until #275 is merged.
35f6735 to
203daff
Compare
cli.js
Outdated
| @@ -22,6 +22,11 @@ if (!args.dir || (!args.all && (!args.platform || !args.arch))) { | |||
| process.exit(1) | |||
| } | |||
|
|
|||
| // minimist doesn't support to specify several types (string|boolean) | |||
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.
Commend added.
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.
It would read better as:
// minimist doesn't support multiple types for a single argument (in this case, `String` or `false`)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.
Fixed, thanks.
On Mar 1, 2016, at 8:22 AM, Mark Lee [email protected] wrote:
In cli.js
:@@ -22,6 +22,11 @@ if (!args.dir || (!args.all && (!args.platform || !args.arch))) {
process.exit(1)
}+// minimist doesn't support to specify several types (string|boolean)
It would read better as:// minimist doesn't support multiple types for a single argument (in this case,
Stringorfalse)—
Reply to this email directly or view it on GitHub
.
0c12b8b to
d34bc04
Compare
readme.md
Outdated
| @@ -248,7 +248,7 @@ If the file extension is omitted, it is auto-completed to the correct extension | |||
|
|
|||
| `tmpdir` - *String* | |||
|
|
|||
| The base directory to use as a temp directory. Defaults to the system temp directory. | |||
| The base directory to use as a temp directory. Defaults to the system temp directory. Set to `false` to write to `out` directly without temp. | |||
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.
Docs added.
5985c9a to
1362bc3
Compare
usage.txt
Outdated
| @@ -33,7 +33,7 @@ sign should contain the identity to be used when running `codesign | |||
| sign-entitlements the path to entitlements used in signing (mas platform only) | |||
| strict-ssl whether SSL certificates are required to be valid when downloading Electron. | |||
| It defaults to true, use --strict-ssl=false to disable checks. | |||
| tmpdir temp directory. Defaults to system temp directory. | |||
| tmpdir temp directory. Defaults to system temp directory. Set to `false` to write to `out` directly without temp. | |||
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.
For consistency:
Defaults to system temp directory, use --tmpdir=false to disable functionality.
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.
Changed, but don't quite agree that "to disable functionality." is clear — because result of "disable functionality." is not clear. Opposite to "to write to out directly without temp".
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.
Perhaps:
Specify --tmpdir=false to disable use of a temporary directory.
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.
I feel a little stupid compared to you :) Changed.
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.
Well, I was trying to avoid having it say some variant of "temp directory" three times in three sentences - I guess that didn't work out. (I am open to suggestions.)
1362bc3 to
75bdb0c
Compare
And as a workaround of concurrent access to the same temp dir
75bdb0c to
297345b
Compare
|
👍 |
Ability to set tmpdir to false to disable using temp directory
Continue #251.
Test added.