diff --git a/src/commands/yarn_install.yml b/src/commands/yarn_install.yml index 39ec8fb..b3738ca 100644 --- a/src/commands/yarn_install.yml +++ b/src/commands/yarn_install.yml @@ -9,6 +9,10 @@ parameters: description: The path to the yarn cache folder. Defaults to /tmp/yarn type: string default: "/tmp/yarn" + yarn_install_directory: + description: The working directory to run install at. Defaults to yarn's current working directory + type: string + default: "" steps: - when: @@ -23,9 +27,20 @@ steps: - restore_cache: keys: - yarn-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ checksum "~/.tmp/checksumfiles/yarn.lock" }}-{{ .Environment.CACHE_VERSION }} - - run: - name: Yarn Install - command: "yarn install --frozen-lockfile --non-interactive --cache-folder <>" + - when: + condition: + equal: ["", <>] + steps: + - run: + name: Yarn Install + command: "yarn install --frozen-lockfile --non-interactive --cache-folder <>" + - unless: + condition: + equal: ["", <>] + steps: + - run: + name: Yarn Install (<>) + command: "yarn --cwd <> install --frozen-lockfile --non-interactive --cache-folder <>" - when: condition: <> steps: