FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
socket-cli/bin/yarn-cli.js at v1.x · SocketDev/socket-cli · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
SocketDev
/
socket-cli
Public
Notifications
You must be signed in to change notification settings
Fork
62
Star
317
Code
Issues
11
Pull requests
2
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
socket-cli
/
bin
/
yarn-cli.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
29 lines (23 loc) · 788 Bytes
Breadcrumbs
socket-cli
/
bin
/
yarn-cli.js
Copy path
File metadata and controls
executable file
·
29 lines (23 loc) · 788 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env node
'use strict'
void
(
async
(
)
=>
{
const
Module
=
require
(
'node:module'
)
const
path
=
require
(
'node:path'
)
const
rootPath
=
path
.
join
(
__dirname
,
'..'
)
Module
.
enableCompileCache
?.
(
path
.
join
(
rootPath
,
'.cache'
)
)
const
shadowYarnBin
=
require
(
path
.
join
(
rootPath
,
'dist/shadow-yarn-bin.js'
)
)
process
.
exitCode
=
1
const
{
spawnPromise
}
=
await
shadowYarnBin
(
process
.
argv
.
slice
(
2
)
,
{
stdio
:
'inherit'
,
}
)
// See https://nodejs.org/api/child_process.html#event-exit.
spawnPromise
.
process
.
on
(
'exit'
,
(
code
,
signalName
)
=>
{
if
(
signalName
)
{
process
.
kill
(
process
.
pid
,
signalName
)
}
else
if
(
typeof
code
===
'number'
)
{
// eslint-disable-next-line n/no-process-exit
process
.
exit
(
code
)
}
}
)
await
spawnPromise
}
)
(
)
Back
|
FazBrowse Home
|
New Git URL