QuestionQ56
DevSecOps Pipeline-Code StageJordon Garrett works as a DevSecOps engineer at an IT company located in Chicago, Illinois. His team prefers PowerShell for using Git hooks because Bash and Windows are incompatible for advanced executions. To call a PowerShell script from a Bash shell, Jordon created a PowerShell script with pre-commit logic, such as pre-commit.ps1, and executed the following commands:
#!C:/Program\Files/Git/usr/bin/sh.exe
exec powershell.exe -NoProfile -ExecutionPolicy Bypass -File “.\.git\hooks\pre-commit.ps1”
How would Jordon determine that the commit was successful?
- A If the code exits with 3, then the commit is successful
- B If the code exits with 0, then the commit is successful
- C If the code exits with 2, then the commit is successful
- D If the code exits with 1, then the commit is successful
Community Discussion