https://pulumi.com logo
Title
c

colossal-room-15708

03/20/2020, 6:07 AM
I am running this here in my pulumi script:
const requirements = exec("cd cspm; python3.7 -m venv venv; . venv/bin/activate; pip3.7 install -r requirements.txt", (error: { message: any; }, stdout: any, stderr: any) => {
    if (error) {
        console.log(`error: ${error.message}`);
        return;
    }
    if (stderr) {
        console.log(`stderr: ${stderr}`);
        return;
    }
    console.log(`stdout: ${stdout}`);
});
but if I see it correctly, the following steps (mainly the one zipping everything up) isn't waiting for this to finish. What's the "pulumi way" to wait here?
t

tall-librarian-49374

03/20/2020, 6:51 AM
Sounds like you need a dynamic provider
c

colossal-room-15708

03/20/2020, 6:52 AM
yeah, sounds like it
Okay, I wrote a dynamic provider now, but it seems like the other resources are still not waiting for it. I put a
dependson
onto the resource that should wait for it, but it executes that resource even though the dynamic provider is still running
exec != execSync
/facepalm