mirror of https://github.com/docker/compose.git
Move pat_suggest.go into `cli` package
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
This commit is contained in:
parent
e16d0b48dd
commit
5c427ef702
|
@ -83,7 +83,7 @@ func Exec(root *cobra.Command) {
|
||||||
utils.DisplayScanSuggestMsg()
|
utils.DisplayScanSuggestMsg()
|
||||||
}
|
}
|
||||||
if command == "login" && !metrics.HasQuietFlag(commandArgs) {
|
if command == "login" && !metrics.HasQuietFlag(commandArgs) {
|
||||||
utils.DisplayPATSuggestMsg(commandArgs)
|
displayPATSuggestMsg(commandArgs)
|
||||||
}
|
}
|
||||||
metrics.Track(store.DefaultContextType, os.Args[1:], compose.SuccessStatus)
|
metrics.Track(store.DefaultContextType, os.Args[1:], compose.SuccessStatus)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package utils
|
package mobycli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -35,8 +35,8 @@ For better security, log in with a limited-privilege personal access token. Lear
|
||||||
patPrefix = "dckrp_"
|
patPrefix = "dckrp_"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DisplayPATSuggestMsg displays a message suggesting users to use PATs instead of passwords to reduce scope.
|
// displayPATSuggestMsg displays a message suggesting users to use PATs instead of passwords to reduce scope.
|
||||||
func DisplayPATSuggestMsg(cmdArgs []string) {
|
func displayPATSuggestMsg(cmdArgs []string) {
|
||||||
if os.Getenv("DOCKER_PAT_SUGGEST") == "false" {
|
if os.Getenv("DOCKER_PAT_SUGGEST") == "false" {
|
||||||
return
|
return
|
||||||
}
|
}
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package utils
|
package mobycli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
Loading…
Reference in New Issue