Skip to content

Commit 065084d

Browse files
committed
CLI: replace simple-git with execSync
1 parent 27b3c90 commit 065084d

File tree

3 files changed

+1
-34
lines changed

3 files changed

+1
-34
lines changed

package-lock.json

Lines changed: 0 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"level": "^8.0.0",
4545
"portalnetwork": "^0.0.2-rc2",
4646
"prom-client": "^14.0.1",
47-
"simple-git": "^3.27.0",
4847
"yargs": "^17.3.0"
4948
},
5049
"peerDependencies": {

packages/cli/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import debug from 'debug'
44
import jayson from 'jayson/promise/index.js'
55
import { PortalNetwork, cliConfig } from 'portalnetwork'
66
import * as PromClient from 'prom-client'
7-
import { simpleGit } from 'simple-git'
87
import { args } from './cliArgs.js'
98
import { RPCManager } from './rpc/rpc.js'
109

@@ -27,7 +26,7 @@ const main = async () => {
2726
const portalConfig = await cliConfig(args)
2827

2928
portalConfig.operatingSystemAndCpuArchitecture = args.arch
30-
portalConfig.shortCommit = args.commit ?? (await simpleGit().revparse(['HEAD'])).substring(0, 7)
29+
portalConfig.shortCommit = args.commit ?? execSync('git rev-parse HEAD').toString().slice(0, 7)
3130

3231
const portal = await PortalNetwork.create(portalConfig)
3332

0 commit comments

Comments
 (0)