Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1741

Work with %'s in git

$
0
0
I have a Python script I have to work with that has this code:
Code:
cmd = 'cd {} && git log -1 --format="%aN <%aE>" -- {}'.format(
    dir_name, script_name)
last_author_output = subprocess.check_output(
    cmd, shell=True, universal_newlines=True)

That --format statement extracts the author and email of the last person to modify the script_name.

That code works correctly in CMD, Powershell, and bash. However, because of the %'s, it fails in TCC. If I double the %'s it works in TCC...

Read more

Viewing all articles
Browse latest Browse all 1741

Trending Articles