Skip to content

Commit

Permalink
fix: add --force argument to decompile task to preserve default behav…
Browse files Browse the repository at this point in the history
…iour
  • Loading branch information
piraces committed Sep 13, 2022
1 parent 8752f53 commit 19c415c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ Starting with the patch 0.3.4, warnings in the build or decompilation processes

Please consider using the latest version of the Bicep CLI, this extension does not ensure a correct execution with versions prior to `0.4.x`.

## Decompile command

Starting on version `0.3.7` of this extension, the decompile command will overwrite the destination file if it exists.

# Local Development

**Note:** [Bicep](https://github.com/Azure/bicep) must be installed in the local machine. [TypeScript](https://www.typescriptlang.org/download) must be also installed as a global package (`npm i typescript -g`).
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-devops-bicep-task",
"version": "0.3.6",
"version": "0.3.7",
"description": "Tasks for installing Bicep CLI and running Bicep CLI build commands",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/decompile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function getBicepTool(): string | undefined {

export function executeBicepDecompile(files: string[], bicepTool: string, additionalArgsByInputs: string[]): void {
files.forEach((file: string) => {
const args = ['decompile', file, ...additionalArgsByInputs];
const args = ['decompile', file, ...additionalArgsByInputs, '--force'];
const bicepProcess = taskLib.tool(bicepTool).arg(args).execSync();

if (bicepProcess.code !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/decompile/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": {
"Major": 0,
"Minor": 3,
"Patch": 6
"Patch": 7
},
"instanceNameFormat": "Run Bicep CLI decompile command",
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion src/install/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": {
"Major": 0,
"Minor": 3,
"Patch": 6
"Patch": 7
},
"instanceNameFormat": "Install Bicep CLI",
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion src/run/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": {
"Major": 0,
"Minor": 3,
"Patch": 6
"Patch": 7
},
"instanceNameFormat": "Run Bicep CLI build command",
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "bicep-tasks",
"version": "0.3.6",
"version": "0.3.7",
"name": "Bicep Tasks",
"publisher": "piraces",
"description": "Provides Azure DevOps tasks to install and run Microsoft Bicep CLI commands (cross-platform)",
Expand Down

0 comments on commit 19c415c

Please sign in to comment.