Skip to content

Commit

Permalink
Add docker is running and that demo is not running from windows (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
erebe authored Jul 8, 2024
1 parent e174f8c commit 7ab2d25
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/demo_scripts/create_qovery_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ install_deps() {
exit 1
fi

docker_running=$( (docker ps -q >/dev/null && echo true ) || echo false )
if "$docker_running" == "true"; then
echo "docker is running"
else
echo "Docker is not running. Please start Docker before running this command"
exit 1
fi

if which k3d >/dev/null; then
echo "k3d already installed"
else
Expand Down
6 changes: 6 additions & 0 deletions cmd/demo_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ var demoUpCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
utils.Capture(cmd)

if runtime.GOOS == "windows" {
utils.PrintlnError(fmt.Errorf("qovery demo is not supported from Windows. Please use WSL (Windows Subsystem for Linux) to use qovery demo"))
os.Exit(1)
panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011
}

_, token, err := utils.GetAccessToken()
if err != nil {
utils.PrintlnError(err)
Expand Down

0 comments on commit 7ab2d25

Please sign in to comment.