Skip to content

Commit 3c80c2f

Browse files
committed
skip path test on windows, avoid generate assertion on windows
1 parent a28c33e commit 3c80c2f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/core/src/awsService/ec2/sshKeyPair.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export class SshKeyPair {
4545

4646
public static async generateSshKeyPair(keyPath: string): Promise<void> {
4747
const keyGenerated = await SshKeyPair.tryKeyTypes(keyPath, ['ed25519', 'rsa'])
48-
await SshKeyPair.assertGenerated(keyPath, keyGenerated)
4948
// Should already be the case, but just in case we assert permissions.
5049
// skip on Windows since it only allows write permission to be changed.
5150
if (!globals.isWeb && os.platform() !== 'win32') {
5251
await fs.chmod(keyPath, 0o600)
52+
await SshKeyPair.assertGenerated(keyPath, keyGenerated)
5353
}
5454
}
5555
/**

packages/core/src/test/shared/utilities/testUtils.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ import { isWin } from '../../../shared/vscode/env'
1010
import { tryRun } from '../../../shared/utilities/pathFind'
1111

1212
describe('setEnv', function () {
13-
it('modifies the node environment variables', function () {
13+
it('modifies the node environment variables (Non-Windows)', function () {
14+
// PATH returns undefined on Windows.
15+
if (isWin()) {
16+
this.skip()
17+
}
18+
1419
const originalPath = copyEnv().PATH
1520
const fakePath = 'fakePath'
1621
process.env.PATH = fakePath

0 commit comments

Comments
 (0)