You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if I should regard this as an issue, but nonetheless I would like to share my findings.
I (innocently enough) gave my app a name that has spaces in it, only to find that when I tried to build it (grunt dist-win) an error was thrown:
Running "createWindowsApp" task
The syntax of the command is incorrect.
>> Error: Command failed:
Warning: Task "createWindowsApp" failed. Use --force to continue.
Aborted due to warnings.
So I went ahead and looked into the Grunt.js file. Line 152 is where the error was thrown:
exec('copy /b tmp\\nw.exe+tmp\\app.nw tmp\\name with spaces.exe && del tmp\\app.nw tmp\\nw.exe', function (error, stdout, stderr) {
Once I removed the spaces, the zip file was created. (although using the original name, because of line 95)
archive: '<%= config.dist %>/name with spaces.zip'
Running "createWindowsApp" task
tmp\nw.exe
tmp\app.nw
1 file(s) copied.
Running "compress:finalWindowsApp" (compress) task
Created dist/name with spaces.zip (28903351 bytes)
Done, without errors.
So, I'm not sure what the best way to tackle this is, maybe removing the white spaces (replacing them with another character like '_'), or perhaps alerting the user that this will cause trouble on windows environments.
Anyways, I thought I would share this just in case anyone runs into something similar.
Thanks for the hard work!
The text was updated successfully, but these errors were encountered:
Hi @ackzell ,
thanks for sharing your experience and this detailed information. I would also prefer to replace whitespaces for creating the zip file with either '_' or 'camelCaseLize'. I don't know if it is necessary to prompt the user about the renaming because it is only for creating the zip, all other places where the name comes up should remain unaffected.
Hi,
I'm not sure if I should regard this as an issue, but nonetheless I would like to share my findings.
I (innocently enough) gave my app a name that has spaces in it, only to find that when I tried to build it (
grunt dist-win
) an error was thrown:So I went ahead and looked into the Grunt.js file. Line 152 is where the error was thrown:
Once I removed the spaces, the zip file was created. (although using the original name, because of line 95)
So, I'm not sure what the best way to tackle this is, maybe removing the white spaces (replacing them with another character like '_'), or perhaps alerting the user that this will cause trouble on windows environments.
Anyways, I thought I would share this just in case anyone runs into something similar.
Thanks for the hard work!
The text was updated successfully, but these errors were encountered: