Skip to content

Commit

Permalink
rm silent option cli
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianMairinger committed May 22, 2023
1 parent 4110a68 commit f3c3093
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
- name: Run tests
run: |
cross-platform-specs --help
cross-platform-specs --version
cross-platform-specs environment
cross-platform-specs osName
cross-platform-specs osVersion
Expand Down
6 changes: 3 additions & 3 deletions app/src/cli/crossPlatformSpecs-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import reqPackageJson, { reqPackagePath } from "req-package-json"
import {promises as fs} from "fs"
import * as path from "path"
const config = reqPackageJson()
import * as console from "./../lib/logger"
// import * as console from "./../lib/logger"


program
.version(config.version)
.description(config.description)
.name(config.name)
.option('-s, --silent', 'silence stdout')
// .option('-s, --silent', 'silence stdout')
// .argument('<required example>', "description of required example")
// .argument('[optional example]', "description of optional example")
.argument('[specific spec]', `Optionally provide a spec name of interest to only return that spec. Can be one of ["environment", "osName", "osVersion", "runtime", "runtimeVersion", "engine", "engineVersion", "cpuName", "cpuCores", "cpuArch", "memAvailable", "memFree"]. If omitted, a summery of all specs will be returned.`)
.action((spec, options) => {
console.setVerbose(!options.silent)
// console.setVerbose(!options.silent)

if (spec !== undefined) console.log(spec[spec])
else console.log(spec.allSpecs())
Expand Down

0 comments on commit f3c3093

Please sign in to comment.