@@ -5,7 +5,7 @@ Recursively searches for `packages.config` files and converts each to `packages.
55## Manual Usage
66
77``` bash
8- node convert-nuget.js [--tfm < TFM> ] [--root < DIR> ]
8+ node convert-nuget.js [--tfm < TFM> ] [--root < DIR> ] [--fail-on-skipped]
99
1010# Example: scan from current directory
1111node convert-nuget.js
@@ -15,6 +15,9 @@ node convert-nuget.js --tfm net48
1515
1616# Example: scan from a specific directory
1717node convert-nuget.js --root ./projects
18+
19+ # Example: fail if any packages are skipped due to incompatibility
20+ node convert-nuget.js --fail-on-skipped
1821```
1922
2023## Local Docker Usage
@@ -26,13 +29,14 @@ Pull the Docker image from GitHub Container Registry and run it locally:
2629docker pull ghcr.io/semgrep/convert-nuget
2730
2831# Run the conversion (scan from current directory)
29- docker run --rm -v $( pwd) :/workspace -w /workspace ghcr.io/semgrep/convert-nuget
32+ # Note: -w /workspace is optional since /workspace is the default working directory
33+ docker run --rm -v $( pwd) :/workspace ghcr.io/semgrep/convert-nuget
3034
3135# Run the conversion (scan from a specific subdirectory)
32- docker run --rm -v $( pwd) :/workspace -w /workspace ghcr.io/semgrep/convert-nuget --root /workspace/some/subdirectory
36+ docker run --rm -v $( pwd) :/workspace ghcr.io/semgrep/convert-nuget --root /workspace/some/subdirectory
3337
3438# Run with custom target framework
35- docker run --rm -v $( pwd) :/workspace -w /workspace ghcr.io/semgrep/convert-nuget --tfm net48
39+ docker run --rm -v $( pwd) :/workspace ghcr.io/semgrep/convert-nuget --tfm net48
3640```
3741
3842## Docker CI Usage
@@ -41,17 +45,17 @@ docker run --rm -v $(pwd):/workspace -w /workspace ghcr.io/semgrep/convert-nuget
4145# GitHub Actions example
4246- name : Convert packages.config
4347 run : |
44- docker run -v ${{ github.workspace }}:/workspace -w /workspace ghcr.io/semgrep/convert-nuget
48+ docker run -v ${{ github.workspace }}:/workspace ghcr.io/semgrep/convert-nuget
4549
4650# GitLab CI example
4751convert-nuget :
4852 script :
49- - docker run -v $PWD:/workspace -w /workspace ghcr.io/semgrep/convert-nuget
53+ - docker run -v $PWD:/workspace ghcr.io/semgrep/convert-nuget
5054` ` `
5155
5256` ` ` bash
53- # Command line
54- docker run -v $(pwd):/workspace -w /workspace ghcr.io/semgrep/convert-nuget
57+ # Command line (note: -w /workspace is optional)
58+ docker run -v $(pwd):/workspace ghcr.io/semgrep/convert-nuget
5559```
5660
5761## GitHub Actions Usage
7983
8084 - name : Convert packages.config
8185 run : |
82- docker run -v "${{ github.workspace }}:/workspace" -w /workspace ghcr.io/semgrep/convert-nuget
86+ docker run -v "${{ github.workspace }}:/workspace" ghcr.io/semgrep/convert-nuget
8387
8488 - name : Commit updated lock files (if any)
8589 run : |
@@ -108,4 +112,5 @@ jobs:
108112
109113- ` --tfm <TFM>`: Target framework moniker (default: `net472`)
110114- `--root <DIR>` : Root directory to search (default: current working directory)
115+ - `--fail-on-skipped` : Exit with error code 2 if any packages are skipped due to incompatibility (default: warnings only)
111116- `-h, --help` : Show help message
0 commit comments