Fixing chmod

This commit is contained in:
Alexander Mazanov 2021-03-09 13:28:51 -05:00
parent 6c5db152e3
commit e364a6f52a

View File

@ -59,15 +59,7 @@ extension Plugin {
func makeScriptExecutable(file: String) {
guard prefs.makePluginExecutable else { return }
let script = """
if [[ -x "\(file)" ]]
then
echo "File "\(file)" is executable"
else
chmod +x "\(file)"
fi
"""
_ = try? runScript(to: script)
_ = try? runScript(to: "chmod", args: ["+x", "\(file.escaped())"])
}
func refreshPluginMetadata() {