File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,10 @@ import (
1717func newCacheCleanCmd (cfg config.Configuration ) * cobra.Command {
1818 var forceClean bool
1919 appCmd := & cobra.Command {
20- Use : "clean-cache" ,
20+ Use : "clean-cache <app-id> " ,
2121 Short : "Delete app cache" ,
2222 Args : cobra .ExactArgs (1 ),
2323 RunE : func (cmd * cobra.Command , args []string ) error {
24- if len (args ) == 0 {
25- return cmd .Help ()
26- }
2724 app , err := Load (args [0 ])
2825 if err != nil {
2926 return err
Original file line number Diff line number Diff line change @@ -28,10 +28,9 @@ func CleanAppCache(
2828 return err
2929 }
3030 if runningApp .FullPath .EqualsTo (app .FullPath ) {
31- return ErrCleanCacheRunningApp
32- }
33-
34- if req .ForceClean && app .AppComposeFilePath ().Exist () {
31+ if ! req .ForceClean {
32+ return ErrCleanCacheRunningApp
33+ }
3534 // We try to remove docker related resources at best effort
3635 _ = StopAndDestroyApp (ctx , app )
3736 }
You can’t perform that action at this time.
0 commit comments