Skip to content

Add handling of previously installed bicep executable #166

Description

@guidooliveira

The compileBicep and compipeBicepParams functions in helpers/file.ts will try to install bicep from github.com regardless of whether it is already available on the runner's PATH. This makes the action unusable in runners that have no direct internet access.

As a workaround I've added to the functions the following:

// needs import { which } from "@actions/io";
const bicepFilePath: string = await which('bicep', false); 

const bicepPath = !bicepFilePath || bicepFilePath.trim() == "" ? await Bicep.install(tmpdir()) : bicepFilePath; 

Since bicepPath already is being used, I just added the option to look for each locally before attempting to install it.

If you find that this is worth implementing, this is how I got it working with a local fork.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions