Question 30
Which observed test most directly validates a fix for the following: A script launched by sudo expects an administrator's custom shell alias to be available?
Explanation
Correct Answer
The best evidence is A noninteractive elevated invocation runs the intended tool without alias expansion. It indicates that Use a real executable path and explicitly define the required execution environment took effect under the constraint that Aliases are shell initialization constructs, not dependable system-wide executables.
Incorrect Answers
The proposed check does not prove the intended behavior. A directly relevant test must show A noninteractive elevated invocation runs the intended tool without alias expansion.
The required verification is A noninteractive elevated invocation runs the intended tool without alias expansion, not a result meant for An operator writes backup.sh with Bash arrays but invokes it through sh on a non-Bash system.
The related but distinct situation is “A shell script prints an updated working directory but the parent terminal remains unchanged”. The best evidence is pwd in the invoking terminal reports the intended directory after sourcing. For the stated problem, “A noninteractive elevated invocation runs the intended tool without alias expansion” addresses the central condition.