Skip to content

Commit 8b8fb5e

Browse files
committed
Return error when no port detected
1 parent 126c6e8 commit 8b8fb5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/tkey/tkey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewTKey(devPath string, verbose bool) (*TKey, error) {
5757
if devPath == "" {
5858
devPath, err = util.DetectSerialPort(true)
5959
if err != nil {
60-
return nil, nil
60+
return nil, fmt.Errorf("no device")
6161
}
6262
}
6363

0 commit comments

Comments
 (0)