MCPcopy Create free account
hub / github.com/DFHack/dfhack / get_cmd

Function get_cmd

ci/script-docs.py:10–15  ·  view source on GitHub ↗

Get the command from the name of a script.

(path)

Source from the content-addressed store, hash-verified

8IS_GITHUB_ACTIONS = bool(os.environ.get('GITHUB_ACTIONS'))
9
10def get_cmd(path):
11 """Get the command from the name of a script."""
12 dname, fname = basename(dirname(path)), splitext(basename(path))[0]
13 if dname in ('devel', 'fix', 'gui', 'modtools'):
14 return dname + '/' + fname
15 return fname
16
17
18def print_error(message, filename, line=None):

Callers 1

check_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected