Skip to content

Commit 5e9c7ca

Browse files
KevinRansombrettfo
authored andcommitted
Fix linux build (dotnet#5748) (dotnet#5784)
* Attempt to fix linux build * Clean up
1 parent 7f8374e commit 5e9c7ca

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/scripts/scriptlib.fsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ module Scripting =
6060

6161
let (++) a b = Path.Combine(a,b)
6262

63-
let getBasename a = Path.GetFileNameWithoutExtension a
64-
let getFullPath a = Path.GetFullPath a
65-
let getFilename a = Path.GetFileName a
66-
let getDirectoryName a = Path.GetDirectoryName a
63+
let getBasename (a: string) = Path.GetFileNameWithoutExtension(a)
64+
let getFullPath a = Path.GetFullPath(a)
65+
let getFilename (a: string) = Path.GetFileName(a)
66+
let getDirectoryName (a: string) = Path.GetDirectoryName(a)
6767

6868
let copyFile source dir =
6969
let dest =
7070
if not (Directory.Exists dir) then Directory.CreateDirectory dir |>ignore
71-
let result = Path.Combine(dir, Path.GetFileName source)
71+
let result = Path.Combine(dir, getFilename source)
7272
result
7373
//printfn "Copy %s --> %s" source dest
7474
File.Copy(source, dest, true)
@@ -96,7 +96,7 @@ module Scripting =
9696
let processExePath baseDir exe =
9797
if Path.IsPathRooted(exe) then exe
9898
else
99-
match Path.GetDirectoryName(exe) with
99+
match getDirectoryName exe with
100100
| "" -> exe
101101
| _ -> Path.Combine(baseDir,exe) |> Path.GetFullPath
102102

0 commit comments

Comments
 (0)