Commit 418cc580 authored by Mart Lubbers's avatar Mart Lubbers
Browse files

cpm: Fix the help for path options

Previously when an invalid path option was given, the project name was
discarded, resulting in an error parsing the project file instead of an
error in the path command
parent fae734ea
Pipeline #17735 passed with stage
in 45 seconds
......@@ -60,8 +60,8 @@ parse_Project_path_args ["move",i,direction_name] project_name
# (is_direction,direction) = parse_PathDirection direction_name;
| size i>0 && only_digits_in_string 0 i && is_direction
= Project project_name (ProjectPath (MovePathAction (toInt i) direction));
parse_Project_path_args _ _
= Project "" (ProjectPath PathHelp);
parse_Project_path_args _ project_name
= Project project_name (ProjectPath PathHelp);
parse_PathDirection :: !String -> (!Bool,PathDirection);
parse_PathDirection "up" = (True,MovePathUp);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment