Skip to content

Commit 10fce9f

Browse files
committed
Disable test in Windows
1 parent a75956b commit 10fce9f

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

src/commands/manifest/convert_gradle_to_maven.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ export async function convertGradleToMaven(
3131
}
3232

3333
try {
34-
// Run sbt with the init script we provide which should yield zero or more pom files.
35-
// We have to figure out where to store those pom files such that we can upload them and predict them through the GitHub API.
36-
// We could do a .socket folder. We could do a socket.pom.gz with all the poms, although I'd prefer something plain-text if it is to be committed.
34+
// Run sbt with the init script we provide which should yield zero or more
35+
// pom files. We have to figure out where to store those pom files such that
36+
// we can upload them and predict them through the GitHub API. We could do a
37+
// .socket folder. We could do a socket.pom.gz with all the poms, although
38+
// I'd prefer something plain-text if it is to be committed.
3739

3840
// Note: init.gradle will be exported by .config/rollup.dist.config.mjs
3941
const initLocation = path.join(constants.rootDistPath, 'init.gradle')

src/constants.ts

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -248,25 +248,17 @@ const lazyNmBinPath = () =>
248248
// Lazily access constants.rootPath.
249249
path.join(constants.rootPath, `${NODE_MODULES}/.bin`)
250250

251+
// Harden Node security.
252+
// https://nodejs.org/en/learn/getting-started/security-best-practices
251253
const lazyNodeHardenFlags = () =>
252254
// The '@rollup/plugin-replace' will replace "process.env[INLINED_SOCKET_CLI_SENTRY_BUILD]".
253255
process.env[INLINED_SOCKET_CLI_SENTRY_BUILD]
254256
? []
255-
: // Harden Node security.
256-
// https://nodejs.org/en/learn/getting-started/security-best-practices
257-
[
258-
'--disable-proto',
259-
'delete',
260-
// Lazily access constants.WIN32.
261-
constants.WIN32
262-
? // We have contributed the following patches to our dependencies to make
263-
// Node's --frozen-intrinsics workable.
264-
// √ https://github.com/SBoudrias/Inquirer.js/pull/1683
265-
// √ https://github.com/pnpm/components/pull/23
266-
['--frozen-intrinsics']
267-
: [],
268-
'--no-deprecation'
269-
]
257+
: // We have contributed the following patches to our dependencies to make
258+
// Node's --frozen-intrinsics workable.
259+
// √ https://github.com/SBoudrias/Inquirer.js/pull/1683
260+
// √ https://github.com/pnpm/components/pull/23
261+
['--disable-proto', 'delete', '--frozen-intrinsics', '--no-deprecation']
270262

271263
const lazyRootBinPath = () =>
272264
// Lazily access constants.rootPath.

test/socket-cdxgen.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ const testPath = __dirname
1717
const npmFixturesPath = path.join(testPath, 'socket-npm-fixtures')
1818

1919
const spawnOpts: PromiseSpawnOptions = {
20-
cwd: npmFixturesPath
20+
cwd: npmFixturesPath,
21+
env: {
22+
...process.env,
23+
SOCKET_CLI_DEBUG: '1'
24+
}
2125
}
2226

2327
describe('Socket cdxgen command', async () => {
@@ -27,6 +31,7 @@ describe('Socket cdxgen command', async () => {
2731
it(
2832
'should forwards known commands to cdxgen',
2933
{
34+
skip: process.platform === 'win32',
3035
// Takes ~10s in CI
3136
timeout: 20_000
3237
},

0 commit comments

Comments
 (0)