A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/benpye/wsl-ssh-pageant/commit/18e270caaee926321c3e72461da685134a0aabd8 below:

Adding error message when sock file exists · benpye/wsl-ssh-pageant@18e270c · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+6

-4

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+6

-4

lines changed Original file line number Diff line number Diff line change

@@ -239,14 +239,16 @@ func main() {

239 239

}()

240 240 241 241

if *unixSocket != "" {

242 -

if *force {

243 -

// If the socket file already exists then unlink it

244 -

_, err := os.Stat(*unixSocket)

245 -

if err == nil || !os.IsNotExist(err) {

242 +

_, err := os.Stat(*unixSocket)

243 +

if err == nil || !os.IsNotExist(err) {

244 +

if *force {

245 +

// If the socket file already exists then unlink it

246 246

err = syscall.Unlink(*unixSocket)

247 247

if err != nil {

248 248

log.Fatalf("Failed to unlink socket %s, error '%s'\n", *unixSocket, err)

249 249

}

250 +

} else {

251 +

log.Fatalf("Error: the SSH_AUTH_SOCK file already exists. Please delete it manually or use --force option.")

250 252

}

251 253

}

252 254

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4