Skip to content

pac solution Import fails with error but does not stop script #253

Closed

Description

@craig-lund

When running the pac solution import command in a PowerShell script, errors do not fail the script. When using pac solution pack errors do fail the script.
image
image

Activity

  1. changed the title [-]pac Import fails with error but does not stop script[/-] [+]pac solution Import fails with error but does not stop script[/+] on Dec 7, 2022
  2. rpothin commented on Jan 12, 2023

    @rpothin

    Hi Craig Lund (@craig-lund),

    Can you try to use the $? automatic variable available in PowerShell to detect if there is an error?

    You can find an example of implementation I have done here.

    Note: In my case I run again the command to get the error it returns because I am catching it in a variable in the first execution.

    I hope this idea will help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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