Skip to content

Commit

Permalink
Get rid of OS specific file path separators
Browse files Browse the repository at this point in the history
as suggested by @linkrope in linkrope#17 (comment).
Not tested yet on Windows as locally not available, currently. Runs wel on Linux.
  • Loading branch information
kuniss committed Apr 11, 2024
1 parent 3c18b46 commit b2909b6
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/gamma/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,6 @@ void build(string[] fileNames, string outputDirectory)
args ~= format!"-of=%s"(fileNames.front.stripExtension.executableName);
}

version(Windows)
{
import std.string : translate;
for(int i; i < args.length; i++)
{
dchar[dchar] translation = ['/': '\\'];
args[i] = translate(args[i], translation);
}
}

info!"%s"(args.join(' '));

auto pid = spawnProcess(args);
Expand All @@ -269,4 +259,4 @@ string executableName(const string name)
return name ~ ".exe";
else
return name;
}
}

0 comments on commit b2909b6

Please sign in to comment.