Skip to content

Commit 0372313

Browse files
authored
Merge pull request #497 from urbanjost/equal
correct for equal sign in flag options to fix #495
2 parents e6688d0 + 21c6fe6 commit 0372313

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

fpm.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ rev = "2f5eaba864ff630ba0c3791126a3f811b6e437f3"
1212

1313
[dependencies.M_CLI2]
1414
git = "https://github.com/urbanjost/M_CLI2.git"
15-
rev = "1f3b922ce35f105d1a51869bed9a1013b5b552b6"
15+
rev = "ea6bbffc1c2fb0885e994d37ccf0029c99b19f24"
1616

1717
[[test]]
1818
name = "cli-test"

src/fpm_environment.f90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ function get_command_arguments_quoted() result(args)
217217
elseif(ilength.gt.0)then
218218
if(index(arg//' ','-').ne.1)then
219219
args=args//quote//arg//quote//' '
220+
elseif(index(arg,' ').ne.0)then
221+
args=args//quote//arg//quote//' '
220222
else
221223
args=args//arg//' '
222224
endif

test/cli_test/cli_test.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ program main
5353
'CMD="run proj1 p2 project3 --profile debug", NAME="proj1","p2","project3",profile="debug",', &
5454
'CMD="run proj1 p2 project3 --profile release", NAME="proj1","p2","project3",profile="release",', &
5555
'CMD="run proj1 p2 project3 --profile release -- arg1 -x ""and a long one""", &
56-
&NAME="proj1","p2","project3",profile="release",ARGS="""arg1"" -x ""and a long one""", ', &
56+
&NAME="proj1","p2","project3",profile="release",ARGS="""arg1"" ""-x"" ""and a long one""", ', &
5757

5858
'CMD="test", ', &
5959
'CMD="test my_project", NAME="my_project", ', &
6060
'CMD="test proj1 p2 project3", NAME="proj1","p2","project3", ', &
6161
'CMD="test proj1 p2 project3 --profile debug", NAME="proj1","p2","project3",profile="debug",', &
6262
'CMD="test proj1 p2 project3 --profile release", NAME="proj1","p2","project3",profile="release",', &
6363
'CMD="test proj1 p2 project3 --profile release -- arg1 -x ""and a long one""", &
64-
&NAME="proj1","p2","project3",profile="release" ARGS="""arg1"" -x ""and a long one""", ', &
64+
&NAME="proj1","p2","project3",profile="release" ARGS="""arg1"" ""-x"" ""and a long one""", ', &
6565

6666
'CMD="build", NAME= profile="",ARGS="",', &
6767
'CMD="build --profile release", NAME= profile="release",ARGS="",', &

0 commit comments

Comments
 (0)