mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 16:03:22 +01:00
Fix file permissions
This commit is contained in:
parent
4a4c074c83
commit
d3b6934da7
9
Scripts/edit.ps1
Normal file → Executable file
9
Scripts/edit.ps1
Normal file → Executable 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
0
Scripts/introduce-powershell.ps1
Normal file → Executable file
Loading…
Reference in New Issue
Block a user