Skip to content

Commit 24903fe

Browse files
committed
configure.{sh,fsx}: fix bad order of tool findings
When porting stable's branch commit [1] to master branch [2] we missed the fact that our configure.fsx script in the master branch checks for `dotnet` executable before the OS match block so the " found" string was not being printed first. This fixes it with a flag so that if someone calls the .fsx file by hand then the " found" string doesn't show up in that case. [1] ae9f2a6 [2] 0b23222
1 parent 3114fc3 commit 24903fe

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ if [ ! -z "${RUNNER_ARG}" ]; then
7373
echo -e "FsxRunnerArg=$RUNNER_ARG" >> scripts/build.config
7474
fi
7575
source scripts/build.config
76-
DOTNET_NOLOGO=true $RUNNER_BIN $RUNNER_ARG ./scripts/configure.fsx "$@"
76+
DOTNET_NOLOGO=true $RUNNER_BIN $RUNNER_ARG ./scripts/configure.fsx --from-configure "$@"

scripts/configure.fsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
open System
44
open System.IO
5+
open System.Linq
56

67
#if !LEGACY_FRAMEWORK
78
#r "nuget: Fsdk, Version=0.6.0--date20231031-0834.git-2737eea"
@@ -18,6 +19,10 @@ open Fsdk.Process
1819
#load "fsxHelper.fs"
1920
open GWallet.Scripting
2021

22+
let argsToThisFsxScript = Misc.FsxOnlyArguments()
23+
if argsToThisFsxScript.Any(fun arg -> arg = "--from-configure") then
24+
Console.WriteLine " found"
25+
2126
let rootDir = DirectoryInfo(Path.Combine(__SOURCE_DIRECTORY__, ".."))
2227
let stableVersionOfMono = Version("6.6")
2328

@@ -39,10 +44,6 @@ let buildTool, legacyBuildTool, areGtkLibsAbsentOrDoesNotApply =
3944

4045
dotnetCmd, msbuildCmd, true
4146
| platform (* Unix *) ->
42-
43-
// because it comes from configure.sh's "Checking for a working F# REPL..."
44-
Console.WriteLine " found"
45-
4647
Process.ConfigCommandCheck ["make"] true true |> ignore
4748

4849
match Process.ConfigCommandCheck ["mono"] false true with
@@ -158,7 +159,7 @@ if buildTool.IsNone && legacyBuildTool.IsNone then
158159

159160
Environment.Exit 1
160161

161-
let prefix = DirectoryInfo(Misc.GatherOrGetDefaultPrefix(Misc.FsxOnlyArguments(), false, None))
162+
let prefix = DirectoryInfo(Misc.GatherOrGetDefaultPrefix(argsToThisFsxScript, false, None))
162163

163164
if not (prefix.Exists) then
164165
let warning = sprintf "WARNING: prefix doesn't exist: %s" prefix.FullName
@@ -217,7 +218,7 @@ let configFileToBeWritten =
217218

218219
let finalConfigFile =
219220
let nativeSegwitEnabled =
220-
Misc.FsxOnlyArguments()
221+
argsToThisFsxScript
221222
|> List.contains "--native-segwit"
222223
if nativeSegwitEnabled then
223224
configFileStageThree

0 commit comments

Comments
 (0)