@@ -50,8 +50,7 @@ def workspace_add(conan_api: ConanAPI, parser, subparser, *args):
50
50
subparser .add_argument ('path' , nargs = "?" ,
51
51
help = 'Path to the package folder in the user workspace' )
52
52
add_reference_args (subparser )
53
- subparser .add_argument ("--ref" , nargs = "?" ,
54
- help = "Open and add this reference" )
53
+ subparser .add_argument ("--ref" , help = "Open and add this reference" )
55
54
subparser .add_argument ("-of" , "--output-folder" ,
56
55
help = 'The root output folder for generated and build files' )
57
56
group = subparser .add_mutually_exclusive_group ()
@@ -78,9 +77,10 @@ def workspace_add(conan_api: ConanAPI, parser, subparser, *args):
78
77
@conan_subcommand ()
79
78
def workspace_remove (conan_api : ConanAPI , parser , subparser , * args ):
80
79
"""
81
- Remove packages to current workspace
80
+ Remove packages from the current workspace
82
81
"""
83
- subparser .add_argument ('path' , help = 'Path to the package folder in the user workspace' )
82
+ subparser .add_argument ('path' ,
83
+ help = 'Path to the package folder in the user workspace' )
84
84
args = parser .parse_args (* args )
85
85
removed = conan_api .workspace .remove (make_abs_path (args .path ))
86
86
ConanOutput ().info (f"Removed from workspace: { removed } " )
@@ -170,6 +170,8 @@ def workspace_install(conan_api: ConanAPI, parser, subparser, *args):
170
170
Install the workspace as a monolith, installing only external dependencies to the workspace,
171
171
generating a single result (generators, etc) for the whole workspace.
172
172
"""
173
+ subparser .add_argument ("path" , nargs = "*" ,
174
+ help = "Install only these editable packages, not all" )
173
175
subparser .add_argument ("-g" , "--generator" , action = "append" , help = 'Generators to use' )
174
176
subparser .add_argument ("-of" , "--output-folder" ,
175
177
help = 'The root output folder for generated and build files' )
@@ -191,8 +193,7 @@ def workspace_install(conan_api: ConanAPI, parser, subparser, *args):
191
193
192
194
conan_api .workspace .info () # FIXME: Just to force error if WS not enabled
193
195
# Build a dependency graph with all editables as requirements
194
- editables = conan_api .workspace .editable_packages
195
- requires = [ref for ref in editables ]
196
+ requires = conan_api .workspace .select_editables (args .path )
196
197
if not requires :
197
198
raise ConanException ("This workspace cannot be installed, it doesn't have any editable" )
198
199
deps_graph = conan_api .graph .load_graph_requires (requires , [],
0 commit comments