You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop writing an empty environmentVariables to actor.json #1566
apify init writes "environmentVariables": {} into .actor/actor.json, and so does apify create for a template without an actor.json. On apify push, the empty object is truthy, so the CLI sends envVars: [] and deletes every env var set in Apify Console. This is the most common way Console values get wiped, and the fix is safe to ship on its own.
Scope
Remove environmentVariables from EMPTY_LOCAL_CONFIG (src/lib/consts.ts).
In apify push, treat an empty environmentVariables object as absent, so existing projects stop wiping the list (src/commands/actors/push.ts).
Copy EMPTY_LOCAL_CONFIG in apify create instead of mutating the shared object (src/commands/create.ts).
Done when
apify init followed by apify push to an existing Actor leaves the Actor's env vars untouched. An API test covers it.
A push with "environmentVariables": {} sends no envVars.
Activity