aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormilancurcic <caomaco@gmail.com>2020-07-24 13:22:45 -0400
committermilancurcic <caomaco@gmail.com>2020-07-24 13:22:45 -0400
commit0bbf28260688525fdd1a6d6b3476077965e5d80f (patch)
tree8aace03e56ce3211b7be37d6f86e4422b2ade192
parent53b06aadcdf5b527d2df02e2a532c6257acceb22 (diff)
downloadfpm-0bbf28260688525fdd1a6d6b3476077965e5d80f.tar.gz
fpm-0bbf28260688525fdd1a6d6b3476077965e5d80f.zip
error stop in not implemented command subroutines; add exit code to error stop
-rw-r--r--fpm/app/main.f904
-rw-r--r--fpm/src/fpm.f904
2 files changed, 6 insertions, 2 deletions
diff --git a/fpm/app/main.f90 b/fpm/app/main.f90
index 55c22fd..361cae5 100644
--- a/fpm/app/main.f90
+++ b/fpm/app/main.f90
@@ -18,10 +18,10 @@ else if (command_argument_count() == 1) then
call cmd_run()
case default
print *, "fpm error: No such command " // trim(cmdarg)
- error stop
+ error stop 1
end select
else
print *, "Too many arguments"
- error stop
+ error stop 1
end if
end program main
diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90
index d04a62a..aefbfd0 100644
--- a/fpm/src/fpm.f90
+++ b/fpm/src/fpm.f90
@@ -186,18 +186,22 @@ end subroutine
subroutine cmd_install()
print *, "fpm error: 'fpm install' not implemented."
+ error stop 1
end subroutine
subroutine cmd_new()
print *, "fpm error: 'fpm new' not implemented."
+ error stop 1
end subroutine
subroutine cmd_run()
print *, "fpm error: 'fpm run' not implemented."
+ error stop 1
end subroutine
subroutine cmd_test()
print *, "fpm error: 'fpm test' not implemented."
+ error stop 1
end subroutine
end module fpm