Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12417] CLI: wrong behavior when having to specify a project folder including spaces

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-09-03T17:34:53.000+0000
Affected Version/sRelease 3.0.2
Fix Version/sRelease 3.4.0
ComponentsCLI
Labelsft
ReporterFederico Casali
AssigneeTim Poulsen
Created2013-01-24T20:07:21.000+0000
Updated2014-09-15T05:42:51.000+0000

Description

Problem

User might encounter issues when having to specify a project folder Url with spaces, during the project creation

Steps to reproduce

. Delete the default app.workspace (ti config -r app.workspace) . Run 'ti create' When the user is prompted to enter the project folder, the following error happens depending on the input (assuming the target folder is /Users/fcasali/development/project test/
// default Url displayed when dragging the folder from Finder into Mac OS X terminal
/Users/fcasali/development/project\ test/
[ERROR] Specified directory does not exist


// default Url displayed when dragging the folder from File Manager (Explorer or Nautilus) to terminal in Windows or Linux machines
'/Users/fcasali/development/project test/'
[ERROR] Specified directory does not exist
Also using those Urls it fails:
'/Users/fcasali/development/project\ test/'
[ERROR] Specified directory does not exist

'/Users/fcasali/development/project test'
[ERROR] Specified directory does not exist

Project is created in the right folder when manually typing (no \ and no quotes):
/Users/fcasali/development/project test/

Comments

  1. Ingo Muschenetz 2014-04-28

    Out of bandwidth for 3.3.0. Bumping to next version.
  2. Ingo Muschenetz 2014-08-12

    This is actually an issue with the "fields" module, a dependency of our project. There is already a ticket against that project--we should try and submit a PR for the fix.
  3. Tim Poulsen 2014-08-21

    PR for fields module https://github.com/cb1kenobi/fields/pull/5
  4. Tim Poulsen 2014-08-22

    PR https://github.com/appcelerator/titanium_mobile/pull/5982 Functional review steps: 1. Re-install titanium with sudo npm install -g titanium to update its dependency on the fields module. You should see fields version 0.1.13 or newer as the version installed. 2. Delete the default app.workspace ti config -r app.workspace 3. Create a new project ti create and when prompted for the directory in which to create the project, drag a folder from Finder that includes spaces in its name or the name of one of its parents' folders. Finish the creation wizard. The resulting project should be created in the folder you specified. The script should not create a folder whose name contains literal \ characters.
  5. Tim Poulsen 2014-08-22

    Reopening for review
  6. Tim Poulsen 2014-08-27

    PR updated per comment on the pull
  7. Priya Agarwal 2014-09-15

    Verified with test environment: Appcelerator Studio:3.4.0.201409131030 Sdk:3.4.0.v20140913174915 alloy:1.5.0-rc2 titanium:3.4.0-rc3 titanium-code-processor:1.1.1 acs:1.0.16 npm:1.3.2 OS:Maverick(10.9.4) xcode: Xcode6GMSeed Project successfully created when Directory to place project contains space in its folder name. Working fine. Hence closing the issue.

JSON Source