code: function (version, verbose) {
          return __awaiter(this, void 0, void 0, function* () {
              yield mkdirp(ForestInternal.elmRoot(version));
              if (verbose) {
                  console.log('FOREST: Preparing enviroment for', version.expanded);
              }
              try {
                  yield runNpmCommand(version.expanded, ['init', '-y'], false);
              }
              catch (err) {
                  throw new ForestError(Errors.NpmInitFailed, "npm init failed");
              }
              if (verbose) {
                  console.log('FOREST: Installing...');
              }
              try {
                  yield runNpmCommand(version.expanded, ['install', '--save', version.forNpm()], false);
              }
              catch (err) {
                  throw new ForestError(Errors.NpmElmInstallFailed, `\`npm install ${version.forNpm()}\` failed`);
              }
              if (verbose) {
                  console.log('FOREST: Finalizing...');
              }
              let binaryDir = "";
              try {
                  binaryDir = yield runNpmCommand(version.expanded, ['bin'], false);
              }
              catch (err) {
                  throw new ForestError(Errors.NpmBinFailed, "failed to bind elm binary");
              }
              let cachePath = path.join(ForestInternal.elmRoot(version), 'binpath.log');
              let options = { mode: 0o664 };
              let promiseFn = function (resolve, reject) {
                  fs.writeFile(cachePath, binaryDir, options, (err) => {
                      if (err) {
                          throw new ForestError(Errors.BinPathWriteFailed, err.message);
                      }
                      else {
                          resolve([version, true]);
                      }
                  });
              };
              return new Promise(promiseFn);
          });
      }
docs: /* ****************************************************************************
  Perform an installation for a specific elm version