Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 28 additions & 30 deletions scripts/update.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,38 @@ async function main() {
process.stdout.write('\r\x1b[K')
}

// Always update Socket packages when applying (bypass taze maturity period).
if (apply) {
if (!quiet) {
logger.progress('Updating Socket packages...')
}
// Always update Socket packages (bypass taze maturity period).
if (!quiet) {
logger.progress('Updating Socket packages...')
}

const socketResult = await spawn(
'pnpm',
[
'update',
'@socketsecurity/*',
'@socketregistry/*',
'@socketbin/*',
'--latest',
'-r',
],
{
shell: WIN32,
stdio: quiet ? 'pipe' : 'inherit',
},
)
const socketResult = await spawn(
'pnpm',
[
'update',
'@socketsecurity/*',
'@socketregistry/*',
'@socketbin/*',
'--latest',
'-r',
],
{
shell: WIN32,
stdio: quiet ? 'pipe' : 'inherit',
},
)

// Clear progress line.
if (!quiet) {
process.stdout.write('\r\x1b[K')
}
// Clear progress line.
if (!quiet) {
process.stdout.write('\r\x1b[K')
}

if (socketResult.code !== 0) {
if (!quiet) {
logger.fail('Failed to update Socket packages')
}
process.exitCode = 1
return
if (socketResult.code !== 0) {
if (!quiet) {
logger.fail('Failed to update Socket packages')
}
process.exitCode = 1
return
}

if (result.code !== 0) {
Expand Down
Loading