[Chapel Merge] Fix mason bug when using mason external -V or --sp

Branch: refs/heads/main
Revision: 7e6dd94
Author: arezaii
Log Message:

Merge pull request #18490 from arezaii/bug-fix-empty-subcommand

Fix mason bug when using mason external -V or --spec

This PR fixes a small bug where the mason external -V
or mason external --spec commands generate an
invalid subcommand error after printing out their respective
messages.

TESTING:

  • [x] can make mason
  • [x] all tests pass when running util/start_test test/mason

Reviewed by @dlongnecke-cray, thanks!

Signed-off-by: arezaii ahmad.rezaii@hpe.com

Modified Files:
A test/mason/MasonTestHelpers.chpl

A test/mason/MasonTestHelpers.notest
A test/mason/mason-external/masonExternalRanges/COMPOPTS
A test/mason/mason-external/masonExternalRanges/masonExternalExitCodes.chpl
A test/mason/mason-external/masonExternalRanges/masonExternalExitCodes.good
A test/mason/mason-external/versionInfoCompare.chpl
A test/mason/mason-external/versionInfoCompare.good
R test/mason/mason-external/masonExternalRanges/COMPOPTS
R test/mason/mason-external/spackVersionCompare.chpl
R test/mason/mason-external/spackVersionCompare.good
M test/mason/mason-test-exit/COMPOPTS
M test/mason/mason-test-exit/exitCodeTest.chpl
M tools/mason/MasonExternal.chpl

Compare: https://github.com/chapel-lang/chapel/compare/af2695c88ed8...7e6dd9445e60