MCPcopy Index your code
hub / github.com/aws/aws-cli / get_aws_cmd

Function get_aws_cmd

awscli/testutils.py:119–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117
118
119def get_aws_cmd():
120 global AWS_CMD
121 import awscli
122
123 if AWS_CMD is None:
124 # Try <repo>/bin/aws
125 repo_root = os.path.dirname(os.path.abspath(awscli.__file__))
126 aws_cmd = os.path.join(repo_root, 'bin', 'aws')
127 if not os.path.isfile(aws_cmd):
128 aws_cmd = _search_path_for_cmd('aws')
129 if aws_cmd is None:
130 raise ValueError(
131 'Could not find "aws" executable. Either '
132 'make sure it is on your PATH, or you can '
133 'explicitly set this value using '
134 '"set_aws_cmd()"'
135 )
136 AWS_CMD = aws_cmd
137 return AWS_CMD
138
139
140def _search_path_for_cmd(cmd_name):

Callers 1

awsFunction · 0.85

Calls 1

_search_path_for_cmdFunction · 0.85

Tested by

no test coverage detected