diff --git a/src/ScriptExecutor.cs b/src/ScriptExecutor.cs index 939e2b0..a1d14aa 100644 --- a/src/ScriptExecutor.cs +++ b/src/ScriptExecutor.cs @@ -50,32 +50,31 @@ internal static class ScriptExecutor ".bat" or ".cmd" => new ProcessStartInfo { FileName = "cmd", - Arguments = $"/Q /C {file.Name}", + Arguments = $"/Q /C ./{file.Name}", Verb = verb, WorkingDirectory = file.DirectoryName, }, ".ps1" => new ProcessStartInfo { FileName = "powershell.exe", - Arguments = $"-NoProfile -ExecutionPolicy Bypass -File {file.Name}", + Arguments = $"-NoProfile -ExecutionPolicy Bypass -File ./{file.Name}", Verb = verb, WorkingDirectory = file.DirectoryName, }, ".nu" => new ProcessStartInfo { FileName = "nu", - Arguments = $"--no-config-file {file.Name}", + Arguments = $"--no-config-file ./{file.Name}", Verb = verb, WorkingDirectory = file.DirectoryName, }, - ".sh" or ".zsh" or ".fish" => new ProcessStartInfo + _ => new ProcessStartInfo { FileName = "sh", - Arguments = $"-c {file.Name}", + Arguments = $"-c ./{file.Name}", Verb = verb, WorkingDirectory = file.DirectoryName, }, - _ => null, }; } } diff --git a/src/ScriptLauncher.csproj b/src/ScriptLauncher.csproj index 9f57695..3bb83d8 100644 --- a/src/ScriptLauncher.csproj +++ b/src/ScriptLauncher.csproj @@ -2,11 +2,11 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFrameworks>net8.0</TargetFrameworks> + <TargetFramework>net8.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <AnalysisMode>All</AnalysisMode> - <Version>0.1.5</Version> + <Version>0.1.6</Version> <PackAsTool>true</PackAsTool> <Description>Tool to find and exec shell scripts</Description> <PackageReadmeFile>README.md</PackageReadmeFile>