@sealsystems/determine-executable-version

Calls an executable and returns the version information it writes to stdout.

Usage no npm install needed!

<script type="module">
  import sealsystemsDetermineExecutableVersion from 'https://cdn.skypack.dev/@sealsystems/determine-executable-version';
</script>

README

@sealsystems/determine-executable-version

CircleCI

Calls an executable and returns the version information it writes to stdout.

Installation

$ npm install seal-determine-executable-version

Usage

const determineExecutableVersion = require('seal-determine-executable-version');
const options = {
  exeFile: '/bin/bash',
  maxBytes: 128,
  exeArguments: ['--version']
  };

const versionString = await determineExecutableVersion(options);


Parameters:

  • exeFile The full path to the executable file whose version shall be determined. Required option.
  • maxBytes The maximum number of bytes to return from the output; output which is longer is truncated. Default: 128
  • exeArguments The argument list to call the executable file with. Default: ['--version']