cloudmesh / cloudmesh-pi-burn

Burns many SD cards so we can build a Raspberry PI cluster
Other
18 stars 12 forks source link

subprocess .calledprocesserror when running cms burn branch windows #24

Closed jpfleischer closed 2 years ago

jpfleischer commented 2 years ago

When running cms burn branch windows on windows OS i receive this output:

Sledgehammer@Sledgehammer MINGW64 ~/cm
$ cms burn branch windows
WARNING: This command only works if you installed the source version and are standing in the cm directory
The system cannot find the path specified.
The system cannot find the path specified.
ERROR: executing command 'burn branch windows'
======================================================================
Command 'cd cloudmesh-pi-burn; git rev-parse --symbolic-full-name --abbrev-ref HEAD' returned non-zero exit status 1.
Command 'cd cloudmesh-pi-burn; git rev-parse --symbolic-full-name --abbrev-ref HEAD' returned non-zero exit status 1.
Traceback (most recent call last):
  File "C:\Users\Sledgehammer\cm\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 1103, in main
    stop = cmd.onecmd(command)
  File "C:\Users\Sledgehammer\cm\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 421, in onecmd
    return func(arg)
  File "C:\Users\Sledgehammer\cm\cloudmesh-cmd5\cloudmesh\shell\command.py", line 111, in new
    func(instance, args, arguments)
  File "C:\Users\Sledgehammer\cm\cloudmesh-pi-burn\cloudmesh\burn\command\burn.py", line 1101, in do_burn
    b = Shell.run(f"cd {repo}; git rev-parse --symbolic-full-name --abbrev-ref HEAD").strip()
  File "C:\Users\Sledgehammer\cm\cloudmesh-common\cloudmesh\common\Shell.py", line 273, in run
    r = subprocess.check_output(command,
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cd cloudmesh-pi-burn; git rev-parse --symbolic-full-name --abbrev-ref HEAD' returned non-zero exit status 1.

======================================================================
(ENV3)
Sledgehammer@Sledgehammer MINGW64 ~/cm
$
laszewsk commented 2 years ago

I can nout see the error.

it is done in command/burn.py line 1090

laszewsk commented 2 years ago

maybe for now just use os.system maybe the ; has an issue

jpfleischer commented 2 years ago

resolved with edit to shell, where we replace semicolon with ampersand