ssos-user-cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.mjs +3 -1
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { pathToFileURL } from 'node:url'
|
|
3
|
+
import { realpathSync } from 'node:fs'
|
|
3
4
|
import { projectCanonicalCommands } from './canonical-manifest.mjs'
|
|
4
5
|
import { findCanonicalCommand } from './canonical-manifest.mjs'
|
|
5
6
|
import { createUserCliAuth } from './auth.mjs'
|
|
@@ -153,7 +154,8 @@ export function runUserCli(
|
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
const invokedPath = process.argv[1]
|
|
156
|
-
|
|
157
|
+
const invokedRealPath = invokedPath ? realpathSync(invokedPath) : undefined
|
|
158
|
+
if (invokedRealPath && import.meta.url === pathToFileURL(invokedRealPath).href) {
|
|
157
159
|
runUserCliAsync(process.argv.slice(2)).then((code) => { process.exitCode = code }).catch((error) => {
|
|
158
160
|
console.error(error instanceof Error ? error.message : String(error))
|
|
159
161
|
process.exitCode = 1
|