cloudmesh / cloudmesh-pi-burn

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

windows burn does not work on powershell or cmd #74

Open jpfleischer opened 2 years ago

jpfleischer commented 2 years ago

line 498 the shell.execute doesnt work on powershell or cmd. only git bash works windowssdcard.py

        try:
            lines = Shell.bash("cat /proc/partitions")
        except subprocess.CalledProcessError as e:
            print(str(e.output))
        print(lines)
laszewsk commented 2 years ago

we shoudl just replace with python readfile

form cloudmesh.common.util import readfile
try
   lines = readfile("/proc/partitions")
except Exeption as e:
   print(e)
   Console.error("issue reading /proc/partitions)

However i do not know if /pro/partitions even exists on powershell or windows. Please develop pytest so its easy to run on the different osses CMD, powershel, git bash, mac, linus

jpfleischer commented 2 years ago

for cms burn to work: add test for cms burn if you are on windows and git bash is not installed, spit out a warning and interrupt