Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16671] CLI: Add tmp dir check to 'setup check'

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-24T01:41:42.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 06, 2014 Sprint 06 Tooling, Release 3.2.3, Release 3.3.0
ComponentsCLI
Labelsqe-testadded
ReporterChris Barber
AssigneeChris Barber
Created2014-03-22T23:41:13.000+0000
Updated2014-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.

Comments

  1. Chris Barber 2014-03-23

    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
  2. Chris Barber 2014-03-24

    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
  3. Samuel Dowse 2014-03-25

    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.

JSON Source