File tree 1 file changed +1
-12
lines changed
lib/mix_dependency_submission
1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ defmodule MixDependencySubmission.CLI do
45
45
short: "-p" ,
46
46
long: "--project-path" ,
47
47
help: "Path to the project. (`directory` with `mix.exs`)" ,
48
- parser: & parse_project_path / 1 ,
48
+ parser: & parse_directory / 1 ,
49
49
default: & File . cwd! / 0
50
50
] ,
51
51
paths_relative_to: [
@@ -117,17 +117,6 @@ defmodule MixDependencySubmission.CLI do
117
117
]
118
118
end
119
119
120
- @ spec parse_project_path ( path :: String . t ( ) ) :: Optimus . parser_result ( )
121
- defp parse_project_path ( path ) do
122
- with { :ok , path } <- parse_directory ( path ) ,
123
- true <- path |> Path . join ( "mix.exs" ) |> File . regular? ( ) do
124
- { :ok , Path . absname ( path ) }
125
- else
126
- { :error , reason } -> { :error , reason }
127
- false -> { :error , "invalid path" }
128
- end
129
- end
130
-
131
120
@ spec parse_directory ( path :: String . t ( ) ) :: Optimus . parser_result ( )
132
121
defp parse_directory ( path ) do
133
122
if File . dir? ( path ) do
You can’t perform that action at this time.
0 commit comments