mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #46018 from YuPengZTE/devBaseCommand
Automatic merge from submit-queue (batch tested with PRs 46033, 46122, 46053, 46018, 45981) ineffectual assignment to baseCommand, delete it Signed-off-by: yupengzte <yu.peng36@zte.com.cn> **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
commit
af5d057339
@ -119,8 +119,7 @@ func (hk *HyperKube) Run(args []string) error {
|
|||||||
// If we are called directly, parse all flags up to the first real
|
// If we are called directly, parse all flags up to the first real
|
||||||
// argument. That should be the server to run.
|
// argument. That should be the server to run.
|
||||||
command := args[0]
|
command := args[0]
|
||||||
baseCommand := path.Base(command)
|
serverName := path.Base(command)
|
||||||
serverName := baseCommand
|
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
if serverName == hk.Name {
|
if serverName == hk.Name {
|
||||||
|
|
||||||
@ -144,7 +143,6 @@ func (hk *HyperKube) Run(args []string) error {
|
|||||||
args = baseFlags.Args()
|
args = baseFlags.Args()
|
||||||
if len(args) > 0 && len(args[0]) > 0 {
|
if len(args) > 0 && len(args[0]) > 0 {
|
||||||
serverName = args[0]
|
serverName = args[0]
|
||||||
baseCommand = baseCommand + " " + serverName
|
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
} else {
|
} else {
|
||||||
err = errors.New("no server specified")
|
err = errors.New("no server specified")
|
||||||
|
Loading…
Reference in New Issue
Block a user