Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
Use tilde path for environment variable
Browse files Browse the repository at this point in the history
This is more resilient to issues such as spaces in user name.
Fixes #29
  • Loading branch information
haacked committed Oct 30, 2015
1 parent 70a8d45 commit 107c926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Program.cs
Expand Up @@ -47,7 +47,7 @@ public static int Main(string[] args)
var dest = new FileInfo(Environment.ExpandEnvironmentVariables(@"%AppData%\GitPad\GitPad.exe"));
File.Copy(Assembly.GetExecutingAssembly().Location, dest.FullName, true);

Environment.SetEnvironmentVariable("EDITOR", dest.FullName.Replace('\\', '/'), EnvironmentVariableTarget.User);
Environment.SetEnvironmentVariable("EDITOR", "~/AppData/Roaming/GitPad/GitPad.exe", EnvironmentVariableTarget.User);
return 0;
}

Expand Down

0 comments on commit 107c926

Please sign in to comment.