File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ use std::path::{Path, PathBuf};
6
6
use structopt:: { clap:: AppSettings , StructOpt } ;
7
7
use tempfile:: TempDir ;
8
8
9
+ const DEFAULT_MANIFEST_FILE : & str = "spin.toml" ;
10
+
9
11
const APP_CONFIG_FILE_OPT : & str = "APP_CONFIG_FILE" ;
10
12
const BINDLE_ID_OPT : & str = "BINDLE_ID" ;
11
13
const BINDLE_SERVER_URL_OPT : & str = "BINDLE_SERVER_URL" ;
@@ -95,8 +97,12 @@ impl UpCommand {
95
97
let working_dir = working_dir_holder. path ( ) ;
96
98
97
99
let mut app = match ( & self . app , & self . bindle ) {
98
- ( None , None ) => bail ! ( "Must specify app file or bindle id" ) ,
99
- ( Some ( app) , None ) => spin_loader:: from_file ( app, working_dir) . await ?,
100
+ ( app, None ) => {
101
+ let manifest_file = app
102
+ . as_deref ( )
103
+ . unwrap_or_else ( || DEFAULT_MANIFEST_FILE . as_ref ( ) ) ;
104
+ spin_loader:: from_file ( manifest_file, working_dir) . await ?
105
+ }
100
106
( None , Some ( bindle) ) => match & self . server {
101
107
Some ( server) => spin_loader:: from_bindle ( bindle, server, working_dir) . await ?,
102
108
_ => bail ! ( "Loading from a bindle requires a Bindle server URL" ) ,
You can’t perform that action at this time.
0 commit comments