Fix file permissions

This commit is contained in:
Markus Fleschutz 2021-03-29 19:30:56 +02:00
parent 4a4c074c83
commit d3b6934da7
2 changed files with 7 additions and 2 deletions

9
Scripts/edit.ps1 Normal file → Executable file
View File

@ -9,8 +9,13 @@
param($Filename = "")
try {
& notepad.exe "$Filename"
if ($lastExitCode -ne "0") { throw "Can't execute 'notepad.exet' - make sure notepad.exe is installed and available" }
if ($IsLinux) {
& vi "$Filename"
if ($lastExitCode -ne "0") { throw "Can't execute 'vi' - make sure vi is installed and available" }
} else {
& notepad.exe "$Filename"
if ($lastExitCode -ne "0") { throw "Can't execute 'notepad.exe' - make sure notepad.exe is installed and available" }
}
exit 0
} catch {

0
Scripts/introduce-powershell.ps1 Normal file → Executable file
View File