Method
get_bash_command
(
executable: str,
cmd_args: Optional[Dict[str, str]] = None,
)
Source from the content-addressed store, hash-verified
| 137 | |
| 138 | @staticmethod |
| 139 | def get_bash_command( |
| 140 | executable: str, |
| 141 | cmd_args: Optional[Dict[str, str]] = None, |
| 142 | ) -> List[str]: |
| 143 | # go through buck config and turn the dict into a list of "{key}=={value}" |
| 144 | if cmd_args is None: |
| 145 | cmd_args = {} |
| 146 | |
| 147 | cmd_args_strs = [] |
| 148 | for key, value in cmd_args.items(): |
| 149 | cmd_args_strs.extend([f"--{key}={value}"]) |
| 150 | |
| 151 | return [executable] + cmd_args_strs |
| 152 | |
| 153 | |
| 154 | @dataclass |
Tested by
no test coverage detected