File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 49
49
LOCAL_HOOKS = [
50
50
# deactivate
51
51
("predeactivate" ,
52
- "This hook is run before the virtualenv is deactivated." ),
52
+ "This hook is run before this virtualenv is deactivated." ),
53
53
("postdeactivate" ,
54
- "This hook is run after the virtualenv is deactivated." ),
54
+ "This hook is run after this virtualenv is deactivated." ),
55
55
56
56
# activate
57
57
("preactivate" ,
58
- "This hook is run before the virtualenv is activated." ),
58
+ "This hook is run before this virtualenv is activated." ),
59
59
("postactivate" ,
60
- "This hook is run after the virtualenv is activated." ),
60
+ "This hook is run after this virtualenv is activated." ),
61
61
]
62
62
63
63
def make_hook (filename , comment ):
@@ -70,10 +70,10 @@ def make_hook(filename, comment):
70
70
if not os .path .exists (filename ):
71
71
log .info ('Creating %s' , filename )
72
72
with open (filename , 'wt' ) as f :
73
- f .write ("""#!/bin/sh
74
- # %s
73
+ f .write ("""#!%(shell)s
74
+ # %(comment) s
75
75
76
- """ % comment )
76
+ """ % { ' comment' : comment , 'shell' : os . environ . get ( 'SHELL' , '/bin/sh' )} )
77
77
os .chmod (filename , PERMISSIONS )
78
78
return
79
79
You can’t perform that action at this time.
0 commit comments