Skip to content

Improvement: run fpm to print help_text content, after that, fpm should stop in time #727

@zoziha

Description

@zoziha

Description and Expected Behaviour

Currently, when running the fpm command in any fpm project subfolder, the following will be printed:

>> cd fpm/build
>> fpm
Fortran Package Manager:

USAGE: fpm [ SUBCOMMAND [SUBCOMMAND_OPTIONS] ]|[--list|--help|--version]
       where SUBCOMMAND is commonly new|build|run|test

 subcommand may be one of

  build     Compile the package placing results in the "build" directory
  help      Display help
  list      Display this list of subcommand descriptions
  new       Create a new Fortran package directory with sample files
  run       Run the local package application programs
  test      Run the test programs
  update    Update and manage project dependencies
  install   Install project
  clean     Delete the build

 Enter "fpm --list" for a brief list of subcommand options. Enter
 "fpm --help" or "fpm SUBCOMMAND --help" for detailed descriptions.


fpm: Entering directory 'C:\Users\...\fpm'
fpm: Leaving directory 'C:\Users\...\fpm'

fpm should stop after printing the contents of the help_text. But the last two lines show that after the fpm program jumps out of the get_command_line_settings subroutine, the fpm program is still trying to run the code that finds the working_dir and beyond, which doesn't seem to be needed for fpm.

Solution

A stop statement should be manually added at the end of the above if judgment or after the if judgment, so as to avoid running the fpm and fpm-search commands, the fpm program is still running.

Platform and Version of fpm

Windows, fpm 0.6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions