Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11702] CLI: Improve error messages when failing to create directories recursively

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsCLI
Labelscb-tooling
ReporterChris Barber
AssigneeChris Barber
Created2012-11-08T05:36:24.000+0000
Updated2016-08-25T15:29:32.000+0000

Description

wrench.mkdirSyncRecursive() errors with a confusing message when it fails to create a directory due to write permissions. Need to wrap all mkdir calls in a try/catch: *Titanium CLI:* lib/cli.js: fs.mkdir(dir, 0755, function () { lib/config.js: wrench.mkdirSyncRecursive(titaniumConfigFolder); *node-appc:* lib/analytics.js: afs.exists(directory) || wrench.mkdirSyncRecursive(directory); lib/auth.js: wrench.mkdirSyncRecursive(titaniumConfigFolder); lib/auth.js: wrench.mkdirSyncRecursive(titaniumConfigFolder); lib/auth.js: wrench.mkdirSyncRecursive(titaniumConfigFolder); lib/fs.js: wrench.mkdirSyncRecursive(dest); lib/fs.js: if (!files.length) wrench.mkdirSyncRecursive(newDirLocation); lib/fs.js: wrench.mkdirSyncRecursive(newDirLocation); lib/fs.js: wrench.mkdirSyncRecursive(newDirLocation); lib/fs.js: wrench.mkdirSyncRecursive(path.dirname(destFile)); lib/fs.js: fs.mkdir(newDir, srcDirStat.mode, function (err) { lib/plist.js: wrench.mkdirSyncRecursive(path.dirname(file)); lib/zip.js: wrench.mkdirSyncRecursive(destinationDir); *Titanium Mobile - Android:* android/cli/commands/_build.js: wrench.mkdirSyncRecursive(cli.argv['output-dir']); *Titanium Mobile - iPhone:* iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(cli.argv['output-dir']); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(this.assetsDir); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(xcodeBuildDir); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(this.xcodeAppDir); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(xcodeDir); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(dest); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(dir); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(lprojDir); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(dir); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(dest); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(path.join(this.buildDir, 'Classes')); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(to); iphone/cli/commands/_build.js: wrench.mkdirSyncRecursive(path.dirname(id)); iphone/cli/hooks/package.js: wrench.mkdirSyncRecursive(archiveApp); iphone/cli/hooks/package.js: wrench.mkdirSyncRecursive(archiveDsym); *Titanium Mobile - Mobile Web:* mobileweb/cli/commands/_build.js: wrench.mkdirSyncRecursive(this.buildDir); mobileweb/cli/commands/_build.js: wrench.mkdirSyncRecursive(dest); mobileweb/cli/commands/_build.js: wrench.mkdirSyncRecursive(dir); *Titanium Mobile - Global:* support/cli/commands/create.js: afs.exists(projectDir) || wrench.mkdirSyncRecursive(projectDir); *Titanium Mobile - titaniumsdk:* support/node_modules/titanium-sdk/lib/tiappxml.js: wrench.mkdirSyncRecursive(path.dirname(file));

Comments

No comments

JSON Source