Skip to content

rspm test blocklist-rules#

Command to test blocklist rules

Synopsis#

Command to test blocklist rules

Use this to test whether an existing package will be blocked or allowed by a blocklist rule.

Displays the matching rule and time taken to evaluate the blocklist rules.

rspm test blocklist-rules [flags]

Examples#

  rspm test blocklist-rules --repo=[repo name] --package-name=[package name]
  rspm test blocklist-rules --repo=[repo name] --package-name=[package name] --version=[version]

  # Block all 'ggplot2' package versions less than 1.0.0
  rspm create blocklist-rule --package-name=ggplot2 --version='<1.0.0' --description="Block 'ggplot2' versions <1.0.0"

  # Test the latest version of the 'ggplot2' package in the 'cran' repo
  rspm test blocklist-rules --repo=cran --package-name=ggplot2

  # Test an older version of the 'ggplot2' package, version 0.9.0, in the 'cran' repo
  rspm test blocklist-rules --repo=cran --package-name=ggplot2 --version=0.9.0

  # Test the latest version of the 'a4' package in a Bioconductor repo, for Bioconductor 3.16
  rspm test blocklist-rules --repo=bioconductor --package-name=a4 --bioc-version=3.16

  # Allow all 'django' package versions in the 'pypi' source
  rspm create blocklist-rule --source=pypi --package-name=django --exception --description="Allow 'django' in PyPI"

  # Test that the latest version of 'django' in the 'pypi' repo was allowed
  rspm test blocklist-rules --repo=pypi --package-name=django

Options#

      --bioc-version string   Optional. The Bioconductor version, e.g., '3.17'. For Bioconductor repos only.
  -h, --help                  help for blocklist-rules
      --package-name string   Required. The name of the package
      --repo string           Required. The name of the repo.
      --version string        Optional. The version of the package. Defaults to the latest version.

Options inherited from parent commands#

  -a, --address string             The address of the remote server. If not specified, the PACKAGEMANAGER_ADDRESS environment variable is used.
  -c, --config string              Path to config file
      --insecure-ssl-skip-verify   If true, skip SSL certificate validation. This reduces the security that SSL normally provides.
  -o, --output-format string       Specify the output format 'human' for human-readable output or 'json' for JSON-encoded output. (default "human")
  -v, --verbose                    Provide additional output