How to use the gluegun.system.run function in gluegun

To help you get started, we’ve selected a few gluegun examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zce / zce-cli / test / utils.ts View on Github external
export const runCommand = async (cmd: string): Promise =>
  system.run(`node ${join(__dirname, '../bin/zce.js')} ${cmd}`)
github SplitmediaLabsLimited / devctl / src / utils / getDockerHost.js View on Github external
async function getReachableIP() {
  print.info(`Starting Docker IP Detection`);
  try {
    await system.run(`docker image inspect ${DOCKER_CURL}`);
    print.info(
      `docker image ${print.colors.success('✔')} ${print.colors.warning(
        DOCKER_CURL
      )} already exists`
    );
  } catch (err) {
    const spinner1 = print.spin(
      `Fetching ${print.colors.warning(DOCKER_CURL)} image`
    );
    await system.run(`docker pull ${DOCKER_CURL}`);
    spinner1.succeed();
  }

  const port = await getPort();
  const spinner2 = print.spin(
    `Starting dummy HTTP server on port ${print.colors.warning(
github SplitmediaLabsLimited / devctl / src / utils / dockerCompose.js View on Github external
return async ({ cmd, msg, options }) => {
    const command = `docker-compose -f "${compose}" ${cmd}`;

    if (async) {
      const spinner = msg && print.spin(msg);
      try {
        const output = await system.run(command);
        msg && spinner.succeed();
        return output;
      } catch (err) {
        msg && spinner.fail(err.stderr);
        throw err;
      }
    }

    return execSync(command, options);
  };
}