A developer wants Copilot CLI to help fix a failing integration test. They launch the CLI from their home directory because it is convenient. Which option best identifies the anti-pattern?
cd ~
copilot
# Prompt:
# Find the failing integration test, update the code, run the test suite,
# and prepare the changes for a pull request.Choose an answer
Tap an option to check your answer.
Correct answer: The CLI was launched from an unsafe scope.
Why this is the answer
Launching Copilot CLI from the home directory (~) is an anti-pattern because it operates outside the scope of a specific Git repository. Copilot CLI is designed to understand and interact with the context of a Git repository (e.g., files, branches, commit history) to perform tasks like fixing tests or preparing pull requests. When launched from an arbitrary directory like ~, it lacks this crucial context, making it unable to effectively identify the failing test, modify repository files, or manage changes for a pull request. Copilot CLI is not restricted to GitHub Actions; it's a local development tool. Including the target branch name in the prompt is helpful but not the core anti-pattern here. Copilot CLI can modify local repository files when given the proper context within a repository.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed