refactor: subprocess.run (#592)
* change check_call to run * refactor: change check_output to run * Apply suggestions from code review Co-authored-by: Joe Rickerby <joerick@mac.com> Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Joe Rickerby
parent
58c5e56e9f
commit
d2772c2293
@@ -34,11 +34,11 @@ def main():
|
||||
|
||||
if options.open:
|
||||
if sys.platform == 'darwin':
|
||||
subprocess.check_call(['open', '--', project_dir])
|
||||
subprocess.run(['open', '--', project_dir], check=True)
|
||||
elif sys.platform == 'linux2':
|
||||
subprocess.check_call(['xdg-open', '--', project_dir])
|
||||
subprocess.run(['xdg-open', '--', project_dir], check=True)
|
||||
elif sys.platform == 'win32':
|
||||
subprocess.check_call(['explorer', project_dir])
|
||||
subprocess.run(['explorer', project_dir], check=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user