Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print fake shell commands. #785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmchilton
Copy link
Member

A bunch of raw shell scripting was replaced with Python system calls in 9539589, that is great but the cool reporting of the shell commands was lost. This restores the reporting as fake shell commands corresponding to what is happening (sort of).

In the spirit of something @erasche proposed doing in #100.

A bunch of raw shell scripting was replaced with Python system calls in 9539589, that is great but the cool reporting of the shell commands was lost. This restores the reporting as fake shell commands corresponding to what is happening (sort of).

def makedirs(path):
info("mkdir -p '%s'" % path)
os.makedirs(path)
Copy link
Member

@nsoranzo nsoranzo Feb 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A slight difference between mkdir -p and os.makedirs() is that the former succeeds even if the directory already exists, while the latter fails. You may want to guard this with an if not os.path.exists(path):

@nsoranzo
Copy link
Member

If you still want this, I'd prefer human-friendly messages to fake shell commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants