File tree 1 file changed +4
-2
lines changed
pkg/odo/genericclioptions
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
package genericclioptions
2
2
3
3
import (
4
+ "fmt"
4
5
"github.com/redhat-developer/odo/pkg/kclient"
5
6
"github.com/redhat-developer/odo/pkg/log"
6
7
pkgUtil "github.com/redhat-developer/odo/pkg/util"
8
+ v1 "k8s.io/api/core/v1"
7
9
8
10
dfutil "github.com/devfile/library/v2/pkg/util"
9
11
)
@@ -39,12 +41,12 @@ func ApplyIgnore(ignores *[]string, sourcePath string) (err error) {
39
41
40
42
// WarnIfDefaultNamespace warns when user tries to run `odo dev` or `odo deploy` in the default namespace
41
43
func WarnIfDefaultNamespace (namespace string , kubeClient kclient.ClientInterface ) {
42
- if namespace == "default" {
44
+ if namespace == v1 . NamespaceDefault {
43
45
noun := "namespace"
44
46
if isOC , _ := kubeClient .IsProjectSupported (); isOC {
45
47
noun = "project"
46
48
}
47
-
49
+ fmt . Println ()
48
50
log .Warningf ("You are using \" default\" %[1]s, odo may not work as expected in the default %[1]s." , noun )
49
51
log .Warningf ("You may set a new %[1]s by running `odo create %[1]s <name>`, or set an existing one by running `odo set %[1]s <name>`" , noun )
50
52
}
You can’t perform that action at this time.
0 commit comments