You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cd552b0
Browse filesBrowse the repository at this point in the historyBrowse files
fix(device-pin): tell the user to turn the pin off at the layer that set it
A config file or AGENT_DEVICE_DEVICE_PIN is now told to set the pin to
false ("devicePin": false, or the variable to 0), which also overrides a
lower layer that pins. When --device-pin sits on top of a config or
variable that pins as well, the remedy names that layer too, since
dropping the flag alone leaves the pin in force. The variable name comes
from the recorded provenance instead of being hardcoded.
@@ -141,14 +189,14 @@ test('a request selector that contradicts the pin fails with a typed reason nami
141
189
assert.equal(error.code,'INVALID_ARGS');
142
190
assert.equal(
143
191
error.message,
144
-
'device "iPhone 16" conflicts with the device pin from project config file /repo/agent-device.json, which pins platform "ios", device "iPad Pro". Edit or remove "devicePin" in that config to target another device.',
192
+
'device "iPhone 16" conflicts with the device pin from project config file /repo/agent-device.json, which pins platform "ios", device "iPad Pro". Set "devicePin": false in that config to target another device.',
hint: 'This project pins platform "ios", device "iPad Pro" (project config file /repo/agent-device.json). Drop the conflicting selector to use the pinned device, or change the pin in that config.',
199
+
hint: 'This project pins platform "ios", device "iPad Pro" (project config file /repo/agent-device.json). Drop the conflicting selector to use the pinned device, or set "devicePin": false in that config.',
152
200
});
153
201
returntrue;
154
202
},
@@ -183,21 +231,26 @@ test('the conflict tells the user how to lift the pin for the layer that set it'
183
231
constremedies=[
184
232
[{kind: 'flag',label: 'the --device-pin flag'},'Drop --device-pin','drop --device-pin'],
Copy file name to clipboardExpand all lines: src/__tests__/cli-device-pin.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ test('a CLI batch step that names another device fails before any daemon request
43
43
consterror=readJsonError(result.stdout);
44
44
assert.equal(
45
45
error.message,
46
-
`Batch step 1: device "iPhone 16" conflicts with the device pin from project config file ${configPath}, which pins platform "ios", device "iPad Pro". Edit or remove "devicePin" in that config to target another device.`,
46
+
`Batch step 1: device "iPhone 16" conflicts with the device pin from project config file ${configPath}, which pins platform "ios", device "iPad Pro". Set "devicePin": false in that config to target another device.`,
`Batch step 1: device "iPhone 16" conflicts with the device pin from config file ${configPath}, which pins platform "ios", device "iPad Pro". Edit or remove "devicePin" in that config to target another device.`,
70
+
`Batch step 1: device "iPhone 16" conflicts with the device pin from config file ${configPath}, which pins platform "ios", device "iPad Pro". Set "devicePin": false in that config to target another device.`,
0 commit comments