()
| 10 | |
| 11 | |
| 12 | def get_current_context_name(): |
| 13 | name = "default" |
| 14 | docker_cfg_path = find_config_file() |
| 15 | if docker_cfg_path: |
| 16 | try: |
| 17 | with open(docker_cfg_path) as f: |
| 18 | name = json.load(f).get("currentContext", "default") |
| 19 | except Exception: |
| 20 | return "default" |
| 21 | return name |
| 22 | |
| 23 | |
| 24 | def write_context_name_to_docker_config(name=None): |
no test coverage detected