File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,14 @@ func New(opts ...Option) (*Runfiles, error) {
128
128
// not the actual executable.
129
129
// If the binary is invoked from PATH, then os.Args[0] is just the
130
130
// basename of the executable and isn't useful for locating runfiles.
131
- if strings . IndexRune (os .Args [0 ], filepath . Separator ) >= 0 {
131
+ if filepath . Base (os .Args [0 ]) != os . Args [ 0 ] {
132
132
o .program = ProgramName (os .Args [0 ])
133
133
} else {
134
134
exe , err := os .Executable ()
135
135
if err != nil {
136
136
return nil , fmt .Errorf ("runfiles: could not determine executable name: %w" , err )
137
137
}
138
- o .program = ProgramName (os . Args [ 0 ] )
138
+ o .program = ProgramName (exe )
139
139
}
140
140
}
141
141
manifest := ManifestFile (o .program + ".runfiles_manifest" )
You can’t perform that action at this time.
0 commit comments