[TIMOB-16671] CLI: Add tmp dir check to 'setup check'
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-24T01:41:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 06, 2014 Sprint 06 Tooling, Release 3.2.3, Release 3.3.0 |
Components | CLI |
Labels | qe-testadded |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2014-03-22T23:41:13.000+0000 |
Updated | 2014-06-19T12:42:44.000+0000 |
Description
In the 'ti setup check' command, check if the tmp dir exists and is writeable. By default, it looks for the TMPDIR, TMP, and TEMP environment vars, but if those don't exist, it will use ~/tmp. When the CLI is run as sudo and ~/tmp does not exist, then the directory is created as root and will break any command that needs to write a temp file.
Titanium CLI Master pull request: https://github.com/appcelerator/titanium/pull/118 Titanium CLI 3.2.x pull request: https://github.com/appcelerator/titanium/pull/119
To test, we need to assume you do NOT have a ~/tmp directory and if you do, that it is not owned by you and/or writable. 1) Run "ti setup check" 2) Notice under the directory permissions section that the temp directory is valid 3) then run "TMPDIR= ti setup check" 4) Notice under the directory permissions section that the temp directory is not valid
Verified fixed on: Mac OSX 10.9.2 Appcelerator Studio, build: 3.2.3.201403250634 Titanium SDK, build: 3.2.3.v20140325135714 CLI: 3.2.3-dev Alloy: 1.3.1 Following Chris' test instructions, both scenarios worked as expected. Closing.