mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -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)
|
||||
}
|
||||
|
||||
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 ""
|
||||
|
||||
Reference in New Issue
Block a user