Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Bug: yarn might not be installed even when yarn.lock exists #70

@tszngai

Description

@tszngai

So this if statement might return false even when yarn.lock exists, resulting yarn not being installed:

if [[ -f "yarn.lock" ]]; then

The affected if block:

if [[ -f "yarn.lock" ]]; then
	install_or_reuse_yarn "$layers_dir/yarn" "$build_dir"
	export PATH=$layers_dir/yarn/bin:$PATH
fi

I think it might come from this line which changes the workspace directory:

Should be an easy fix. I propose two approaches:

Option 1: Change if [[ -f "yarn.lock" ]]; then to if [[ -f "$build_dir/yarn.lock" ]]; then
Option 2: Add cd $build_dir after this line:

bootstrap_buildpack "$layers_dir/bootstrap"

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions