AnandInguva commented on code in PR #27436:
URL: https://github.com/apache/beam/pull/27436#discussion_r1277037475


##########
sdks/python/container/piputil.go:
##########
@@ -52,6 +53,18 @@ func pipInstallRequirements(files []string, dir, name 
string) error {
        return nil
 }
 
+// isPackageInstalled checks if the given package is installed in the
+// environment.
+func isPackageInstalled(pkgName string) (bool, error) {
+       cmd := exec.Command("python", "-m", "pip", "show", pkgName)
+       if err := cmd.Run(); err != nil {

Review Comment:
   here, the Run method will return an exec.ExitError value so yes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to