Closed digra5319 closed 8 years ago
Hi,
I'm glad to see you're trying to get your hands dirty :P
subprocess.Popen
doesn't accept multiple commands per array entry. It uses every entry as new argument.
So you might want to concatenate these with &&
so they get executed one after the other.
"cd /Users/adigregorio/projects/boot2coreos && vagrant ssh && docker exec -it leonardo bash && cd " + folder + "; hh_client"
I don't know if it will work though.
I tried concatenating the string and got this error, not sure what it means:
File "/Users/adigregorio/Library/Application Support/Sublime Text 3/Packages/hack-sublime/hack.py", line 16, in run
typechecker_output = self.getOutput().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode
Okay, I guess the process didn't do what we expected.
I expect to get an encoded bytes
object. But yours is actually a plain str
.
Either way, removing decode('utf-8')
will get you more information about whats going on.
Replace typechecker_output = self.getOutput().decode('utf-8')
with typechecker_output = self.getOutput()
It should open a box with the result, if you aren't getting a different error.
You could also print typechecker_output
to see what's the content of that variable.
This is stalled. Happy to get conversion about this going on again.
It looks like the piece of code below from the hack.py file is looking for the path to run hh_client. But the commands in my terminal I take to get into my docker container and run hh_client is...
In order to accomplish this I thought I could modify the code below but I get FileNotFoundError: [Errno 2] No such file or directory: cd /Users/adigregorio/projects/boot2coreos in the console.
Is what I am trying to do possible?
ORIGINAL:
MODIFIED: