File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -60,16 +60,20 @@ var (
6060 cobra .CheckErr ("offline mode currently not supported" )
6161 }
6262
63- // TODO: Support an interactive mode .
64- var appName string
63+ // Determine the application directory .
64+ appPath := "."
6565 if len (args ) > 0 {
66- appName = args [0 ]
67- } else {
68- // Infer from current directory.
69- wd , err := os .Getwd ()
66+ appPath = args [0 ]
67+ }
68+ appPath , err := filepath .Abs (appPath )
69+ cobra .CheckErr (err )
70+ appName := filepath .Base (appPath )
71+ if err = os .MkdirAll (appPath , 0o755 ); err != nil {
7072 cobra .CheckErr (err )
71- appName = filepath .Base (wd )
7273 }
74+ err = os .Chdir (appPath )
75+ cobra .CheckErr (err )
76+
7377 // Fail in case there is an existing manifest.
7478 if buildRofl .ManifestExists () {
7579 cobra .CheckErr ("refusing to overwrite existing manifest" )
You can’t perform that action at this time.
0 commit comments