noseglid / atom-build

:hammer: Build your project directly from the Atom editor
https://atom.io/packages/build
MIT License
248 stars 97 forks source link

Problem with build where space in folder name #432

Open eXeGOODER opened 8 years ago

eXeGOODER commented 8 years ago

{PROJECT_PATH} is normal {FILE_ACTIVE_PATH} no work with space in folder name

noseglid commented 8 years ago

What do you mean with "no work". Please elaborate on whats not working.

Include an .atom-build file which exhibits the problem.

clerik commented 8 years ago

I have a similar issue with a space in the cmd property. When I take the generated command and execute it in a windows cmd it works perfectly but not through atom-build.

It use to work before I update it or atom (not sure, I did not used it in a while).

error with sh set to true
Unable to execute: C:/Program Files/Java/jdk1.8.0_45/bin/java
`cmd` cannot contain space. Use `args` for arguments.
Make sure cmd:'C:/Program Files/Java/jdk1.8.0_45/bin/java' and cwd:'C:\DATA\Sources\' exists and have correct access permissions.
Binaries are found in these folders: C:\Program Files\Python35;;/usr/local/bin;/usr/bin;/bin;/usr/sbin;/sbin
error with sh set to false
Unable to execute with shell: C:/Program Files/Java/jdk1.8.0_45/bin/java
Make sure cmd:'C:/Program Files/Java/jdk1.8.0_45/bin/java' and cwd:'C:\DATA\Sources\' exists and have correct access permissions.
Binaries are found in these folders: C:\Program Files\Python35;;/usr/local/bin;/usr/bin;/bin;/usr/sbin;/sbin
.atom-build
cmd: "C:/Program Files/Java/jdk1.8.0_45/bin/java"
args:
  - -jar
  - C:\DATA\Sources\Module-Claim\nova-cli-1.0.0-all.jar
  - deploy-and-execute
  - Claim
  - --workspace_folder=C:\DATA\Sources\
sh: false
errorMatch: ['INFO: \[ERROR\] (?<file>[^\(]+) \(?<line>line (\d+), column (?<col>\d+)\)']
cwd: C:\DATA\Sources\
eXeGOODER commented 8 years ago
cmd: '{PROJECT_PATH}\\pawno\\pawncc.exe'
args: [
    '{FILE_ACTIVE}', '-;+', '-d3'
]
cwd: '{FILE_ACTIVE_PATH}'
name: 'Pawn'

build

noseglid commented 8 years ago

I don't work on windows in general so it'll take some time for me to work with this. If anyone is bothered by it, feel free to dig in.

It's been changed a few times /C /S and then /S was removed when running cross-spawn-async. Apparently that's not right either. I don't understand how cmd.exe works. It seems awkward at best to me.

eXeGOODER commented 8 years ago

I added atom-build.cson new parameter sh: false and now works, sh: true no

Talon1024 commented 8 years ago

I've just opened a pull request to fix this issue.

Talon1024 commented 8 years ago

I think at least part of the problem is line 151 in lib/build.js. This line of code joins exec and its arguments together and converts it to a string. I don't think that's a very elegant solution.

praveenaudi commented 6 years ago

I got this issue with my ubuntu system showing like this Unable to execute: python3 Make sure cmd:'python3' and cwd:'{FILE_ACTIVE_PATH}' exists and have correct access permissions. Binaries are found in these folders: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin