Skip to content

Commit

Permalink
chore: add explanation for status & stop under Windows
Browse files Browse the repository at this point in the history
Refs: #11
  • Loading branch information
lgdd committed Feb 3, 2024
1 parent 7796ba2 commit 8b5a4c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lfr/pkg/cmd/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package status
import (
"fmt"
"os"
"runtime"

"github.com/lgdd/liferay-cli/lfr/pkg/util/printutil"
"github.com/lgdd/liferay-cli/lfr/pkg/util/procutil"
Expand All @@ -20,6 +21,10 @@ var (
)

func run(cmd *cobra.Command, args []string) {
if runtime.GOOS == "windows" {
printutil.Info("not available for Windows since the Tomcat process run in another command window")
os.Exit(0)
}
isRunning, pid, err := procutil.IsCatalinaRunning()
if err != nil {
printutil.Danger(fmt.Sprintf("%s\n", err.Error()))
Expand Down
5 changes: 5 additions & 0 deletions lfr/pkg/cmd/stop/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package stop
import (
"os"
"os/exec"
"runtime"

"github.com/lgdd/liferay-cli/lfr/pkg/util/fileutil"
"github.com/lgdd/liferay-cli/lfr/pkg/util/printutil"
Expand All @@ -21,6 +22,10 @@ var (
)

func run(cmd *cobra.Command, args []string) {
if runtime.GOOS == "windows" {
printutil.Info("not available for Windows since the Tomcat process run in another command window")
os.Exit(0)
}
shutdownScript, err := fileutil.GetTomcatScriptPath("shutdown")

if err != nil {
Expand Down

0 comments on commit 8b5a4c7

Please sign in to comment.