Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c75b3db

Browse filesBrowse files
committed
no chmod on windows
1 parent 6b978fc commit c75b3db
Copy full SHA for c75b3db

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Collapse file

‎bin/new.py‎

Copy file name to clipboardExpand all lines: bin/new.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import argparse
88
import os
9+
import platform
910
import re
1011
import subprocess
1112
import sys
@@ -83,7 +84,10 @@ def main() -> None:
8384
sys.exit('Will not overwrite. Bye!')
8485

8586
print(body(args), file=open(program, 'wt'), end='')
86-
subprocess.run(['chmod', '+x', program])
87+
88+
if platform.system() != 'Windows':
89+
subprocess.run(['chmod', '+x', program], check=True)
90+
8791
print(f'Done, see new script "{program}."')
8892

8993

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.