Skip to content

Commit

Permalink
Merge pull request #8 from amshuman-kr/master
Browse files Browse the repository at this point in the history
Skiped flag.Parse as it interferes with the root command.
  • Loading branch information
George Kuruvilla authored Dec 3, 2019
2 parents 2efc5e3 + 72bec60 commit 2a0f62c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .ci/check
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ if [[ "${SOURCE_PATH}" != *"src/${REPOSITORY}" ]]; then
export GOPATH="${SOURCE_PATH}/tmp"
export GOBIN="${SOURCE_PATH}/tmp/bin"
export PATH="${GOBIN}:${PATH}"
export GO111MODULE=on
fi

# Install Golint (linting tool).
Expand Down
1 change: 1 addition & 0 deletions .ci/test
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ if [[ "${SOURCE_PATH}" != *"src/${REPOSITORY}" ]]; then
export GOPATH="${SOURCE_PATH}/tmp"
export GOBIN="${SOURCE_PATH}/tmp/bin"
export PATH="${GOBIN}:${PATH}"
export GO111MODULE=on
fi

# Install Ginkgo (test framework) to be able to execute the tests.
Expand Down
2 changes: 2 additions & 0 deletions cmd/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func init() {
}

func runProbe(cmd *cobra.Command, args []string) {
klog.V(5).Info("Running probe command")

// set up signals so we handle the first shutdown signal gracefully
stopCh := setupSignalHandler()
deps, err := scaler.LoadProbeDependantsListFile(configFile)
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ func init() {
rootCmd.Flags().StringVar(&strWatchDuration, "watch-duration", defaultWatchDuration, "The duration to watch dependencies after the service is ready.")

klog.InitFlags(nil)
flag.Parse()
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
}

func runRoot(cmd *cobra.Command, args []string) {
flag.Set("logtostderr", "true")
klog.V(5).Info("Running root command")

watchDuration, err := time.ParseDuration(strWatchDuration)
if err != nil {
Expand Down

0 comments on commit 2a0f62c

Please sign in to comment.