File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ struct CreateArgs {
3333
3434#[ derive( Parser ) ]
3535struct UpdateArgs {
36+ #[ clap( long, required = true ) ]
37+ name : String ,
3638 #[ clap( long, required = false , default_value = "python3.10" ) ]
3739 preset : String ,
3840}
@@ -58,9 +60,14 @@ fn main() {
5860 }
5961 }
6062 Cli :: Update ( args) => {
61- println ! ( "Updating project with preset: {:?}" , args. preset) ;
62- check_pyver ( & args. preset ) ;
63- setup_preset ( & args. preset , "" . to_string ( ) , false ) ;
63+ println ! ( "Updating project with name: {}" , args. name) ;
64+ println ! ( "Using preset: {:?} " , args. preset) ;
65+ if args. preset . starts_with ( "python" ) {
66+ check_pyver ( & args. preset ) ;
67+ setup_preset ( & args. preset , args. name , false ) ;
68+ } else {
69+ eprintln ! ( "Preset: {:?} not supported" , args. preset) ;
70+ }
6471 }
6572 }
6673}
Original file line number Diff line number Diff line change 1+ # File set up by cpa: https://github.com/ysawa0/create-python-app for more info.
12[tool .poetry ]
23name = " {{ name }}"
34version = " 0.0.1"
You can’t perform that action at this time.
0 commit comments