Skip to content

Commit 0ccd383

Browse files
committed
Fix linting errors
1 parent 6616247 commit 0ccd383

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/test/suite/session.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,11 @@ suite('Session Communication', () => {
224224
test('attach session artifacts are owner-only', async () => {
225225
const command = await session.getAttachSessionCommand();
226226
const commandMatch = command.match(/^source\((.*)\)$/);
227-
assert.ok(commandMatch, 'attach command should be a source(...) call');
227+
if (!commandMatch) {
228+
throw new Error('attach command should be a source(...) call');
229+
}
228230

229-
const scriptPath = JSON.parse(commandMatch![1]);
231+
const scriptPath = commandMatch[1].slice(1, -1);
230232
const scriptStat = await fs.stat(scriptPath);
231233
assert.strictEqual(scriptStat.mode & 0o777, 0o600, 'attach script should be owner-only');
232234

0 commit comments

Comments
 (0)