<< Back to previous view

[CLJS-159] Suggest removing UNIX shell executable permissions from bin/cljsc.bat Created: 06/Mar/12  Updated: 27/Jul/13  Resolved: 14/Mar/12

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Yesudeep Mangalapilly Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: command, executable, linux, permissions, script, shell, unix, windows
Environment:

Any UNIX platform.



 Description   

Bash completion shows `bin/cljsc.bat` as an executable on UNIX systems
making it very easy to accidentally execute it. However, since
Windows command scripts do not work with UNIX shells, it is not
advisable to allow executable permissions to Windows batch scripts
as accidentally executing them may cause undefined behavior on such
systems.

I strongly suggest stripping UNIX shell executable permissions from
`bin/cljsc.bat`.

Thank you.

Cheers,
Yesudeep.



 Comments   
Comment by Yesudeep Mangalapilly [ 07/Mar/12 12:39 AM ]

The issue also affects:

bin/cljsc.bat
script/repljs.bat
script/repl.bat

Comment by Craig Andera [ 12/Mar/12 1:34 PM ]

I've verified (on both Ubuntu Linux and Windows 7) that stripping the x bit from those files has the desired effect.

The patch is almost too trivial to bother with listing here, but here it is regardless:

diff --git a/bin/cljsc.bat b/bin/cljsc.bat
old mode 100755
new mode 100644
diff --git a/script/repl.bat b/script/repl.bat
old mode 100755
new mode 100644
diff --git a/script/repljs.bat b/script/repljs.bat
old mode 100755
new mode 100644
Comment by David Nolen [ 14/Mar/12 7:22 PM ]

Fixed, https://github.com/clojure/clojurescript/commit/aa51a01141131736871e791918df63f185155421





Generated at Tue Sep 02 14:02:20 CDT 2014 using JIRA 4.4#649-r158309.