Skip to content

Commit

Permalink
WIP move 2
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Aug 22, 2023
1 parent 7d11eec commit 32bb15c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Fsdk/Git.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Git =
let private IsGitInstalled() : bool =
let gitCheckCommand =
match Misc.GuessPlatform() with
| Misc.Platform.Windows ->
| Platform.Windows ->
{
Command = "git"
Arguments = "--version"
Expand Down
10 changes: 5 additions & 5 deletions Fsdk/Misc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ type ArgsParsed =
| OnlyFlags of seq<string>
| BothFlags of seq<string>*string*seq<string>

type Platform =
| Windows
| Linux
| Mac


module Misc =

Expand Down Expand Up @@ -192,11 +197,6 @@ module Misc =
str.Split([| separator |], StringSplitOptions.RemoveEmptyEntries)
)

type Platform =
| Windows
| Linux
| Mac

// FIXME: maybe get rid of this method when we migrate to .NET6 (or earlier)
// because it seems it's unnecessary (e.g. see https://gitlab.com/nblockchain/geewallet/-/merge_requests/140 )
let GuessPlatform() =
Expand Down
2 changes: 1 addition & 1 deletion Fsdk/Network.fs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ module Network =
let internal CreateNugetCommand (nugetExe: FileInfo) (args: string) =
let platform = Misc.GuessPlatform()

if platform = Misc.Platform.Windows then
if platform = Platform.Windows then
{
Command = nugetExe.FullName
Arguments = args
Expand Down
4 changes: 2 additions & 2 deletions Fsdk/Process.fs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ module Process =
paths.Any(fun path -> File.Exists(Path.Combine(path, command)))

let CommandWorksInShell(command: string) : bool =
if (Misc.GuessPlatform() = Misc.Platform.Windows) then
if (Misc.GuessPlatform() = Platform.Windows) then
let exists = File.Exists(command) || IsFileInWindowsPath(command)

if (exists && HasWindowsExecutableExtension(command)) then
Expand Down Expand Up @@ -499,7 +499,7 @@ module Process =

// FIXME: it returns the first result, but we should return all (array<string>)
let VsWhere(searchPattern: string) : Option<string> =
if Misc.GuessPlatform() <> Misc.Platform.Windows then
if Misc.GuessPlatform() <> Platform.Windows then
failwith "vswhere.exe doesn't exist in other platforms than Windows"

let programFiles =
Expand Down
2 changes: 1 addition & 1 deletion fsxc/Fsxc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() }
"dotnet"
#else
match Misc.GuessPlatform() with
| Misc.Platform.Windows ->
| Platform.Windows ->
match Process.VsWhere "**\\fsc.exe" with
| None -> failwith "fsc.exe not found"
| Some fscExe -> fscExe
Expand Down

0 comments on commit 32bb15c

Please sign in to comment.