mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-05 16:47:22 -04:00
Fix error when shearing without a device ID (offline mode)
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ func ShearLocal(targetLocationIncomplete, clientDeviceID string) string {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !onServer { // return the device ID if running on the client
|
if !onServer && len(deviceIDList) > 0 { // return the device ID if running on the client and a device ID exists (online mode)
|
||||||
return deviceIDList[0].Name()
|
return deviceIDList[0].Name()
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Reference in New Issue
Block a user