Skip to content

[Bug]: cmd.script no longer passes args since 3007.7 #68298

@papegaaij

Description

@papegaaij

What happened?

When using a cmd.script state, the args are no longer passed to the script. This was working fine in 3007.6.

The following state with script shows the problem:

state:

test-cmd.script:
  cmd.script:
    - name: salt://test/files/test.sh
    - args: "arguments"

script:

#!/bin/bash

echo "The argument = ${1}"

Output:

         ID: test-cmd.script
    Function: cmd.script
        Name: salt://test/files/test.sh
      Result: True
     Comment: Command 'salt://test/files/test.sh' run
     Started: 15:04:04.597620
    Duration: 18.64 ms
     Changes:   
              ----------
              pid:
                  51507
              retcode:
                  0
              stderr:
              stdout:
                  The argument =

Type of salt install

Official rpm

Major version

3007.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

almalinux-8

salt --versions-report output

Salt Version:
          Salt: 3007.7
 
Python Version:
        Python: 3.10.18 (main, Aug 27 2025, 22:35:38) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 1.16.0
      cherrypy: unknown
  cryptography: 42.0.5
      dateutil: 2.8.2
     docker-py: 7.1.0
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.7
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.5.5
        PyYAML: 6.0.1
         PyZMQ: 25.1.2
        relenv: 0.20.5
         smmap: Not Installed
       timelib: 0.3.0
       Tornado: 6.4.2
           ZMQ: 4.3.4
 
Salt Package Information:
  Package Type: onedir
 
System Versions:
          dist: almalinux 8.10 Cerulean Leopard
        locale: utf-8
       machine: x86_64
       release: 4.18.0-553.70.1.el8_10.x86_64
        system: Linux
       version: AlmaLinux 8.10 Cerulean Leopard

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions