noir-lang / vscode-noir

Apache License 2.0
6 stars 7 forks source link

Error "error: unexpected argument {part_of_path} found" when calling the Compile or Info command, if there is a space in the path of the project from which the command is called #78

Open n0m44 opened 5 months ago

n0m44 commented 5 months ago

Aim

Trying to execute commands Compile | Info | Profile: image

Expected Behavior

The commands will be executed

Bug

My project path has spaces in the folder name: /home/user/myRepos/Test repo/aztec.js-test/aztec-app

When i try to run Compile or Info, i get an error in the console:

Executing task: /home/user/.aztec/bin/aztec-nargo compile --program-dir /home/user/myRepos/Test repo/aztec.js-test/aztec-app/src/contracts --package boxreact 

error: unexpected argument 'repo/aztec.js-test/aztec-app/src/contracts' found

Usage: nargo compile [OPTIONS]

For more information, try '--help'.

 *  The terminal process "/home/user/.aztec/bin/aztec-nargo 'compile', '--program-dir', '/home/user/myRepos/Test repo/aztec.js-test/aztec-app/src/contracts', '--package', 'boxreact'" terminated with exit code: 2. 
 *  Press any key to close the terminal. 

if i move my project to the other folder (path to folder without spaces), like: /home/user/myRepos/OtherRepo - all working fine

To Reproduce

  1. Install the Noir Language Support extension to VScode
  2. Create react app template via create-aztec-app package
  3. Install all aztec packages and utilites like here: https://docs.aztec.network/developers/getting_started/quickstart
  4. Open VScode with project, which created in first step
  5. Open file: src/contracts/src/main.nr
  6. Press the 'Compile' over contract name image

Environment

Ubuntu 22.04.3 LTS

nargo version = 0.25.0 noirc version = 0.25.0+b11911b9d664d37ba21edaee99d4e027e25a9d70 (git version hash: b11911b9d664d37ba21edaee99d4e027e25a9d70, is dirty: false)

Additional Context

ill try to fix it in vscode-noir/src/extension.ts in registerCommands method, but its didnt help me image

result:

 *  Executing task: /home/user/.aztec/bin/aztec-nargo compile --program-dir "/home/user/myRepos/Test repo/aztec.js-test/aztec-app/src/contracts" --package boxreact 

error: unexpected argument 'repo/aztec.js-test/aztec-app/src/contracts"' found

Usage: nargo compile [OPTIONS]

For more information, try '--help'.

 *  The terminal process "/home/user/.aztec/bin/aztec-nargo 'compile', '--program-dir', '"/home/user/myRepos/Test repo/aztec.js-test/aztec-app/src/contracts"', '--package', 'boxreact'" terminated with exit code: 2. 
 *  Press any key to close the terminal.

Would you like to submit a PR for this Issue?

Maybe

Support Needs

Where i need to look to fix that?