Skip to content

Commit

Permalink
Construct a Uri builder in a different way to support linux file paths.
Browse files Browse the repository at this point in the history
Resolves: #37
  • Loading branch information
AnderssonPeter committed Jun 15, 2023
1 parent f2791d0 commit a9bbb65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PowerType/EnablePowerTypePredictor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ protected override void ProcessRecord()
var predictor = new PowerTypePredictor(currentWorkingDirectoryProvider, GetDictionaries());
SubsystemManager.RegisterSubsystem<ICommandPredictor, PowerTypePredictor>(predictor);
PowerTypePredictor.Instance = predictor;

if (PassThru.IsPresent)
{
WriteObject(true);
Expand All @@ -68,7 +67,9 @@ public static string AssemblyPath
get
{
string codeBase = Assembly.GetExecutingAssembly().Location;
UriBuilder uri = new(codeBase);
UriBuilder uri = new();
uri.Scheme = "file://";
uri.Path = codeBase;
return Uri.UnescapeDataString(uri.Path);
}
}
Expand Down

0 comments on commit a9bbb65

Please sign in to comment.