Skip to content

Commit

Permalink
CLI: replace simple-git with execSync
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Jan 15, 2025
1 parent a83fe01 commit 3980994
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 34 deletions.
31 changes: 0 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"level": "^8.0.0",
"portalnetwork": "^0.0.2-rc2",
"prom-client": "^14.0.1",
"simple-git": "^3.27.0",
"yargs": "^17.3.0"
},
"peerDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import debug from 'debug'
import jayson from 'jayson/promise/index.js'
import { PortalNetwork, cliConfig } from 'portalnetwork'
import * as PromClient from 'prom-client'
import { simpleGit } from 'simple-git'
import { args } from './cliArgs.js'
import { RPCManager } from './rpc/rpc.js'

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

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

const portal = await PortalNetwork.create(portalConfig)

Expand Down

0 comments on commit 3980994

Please sign in to comment.