export function mergeSpawnEnvironment(...sources) {
    const merged = Object.create(null);
    for (const source of sources) {
        for (const [key, value] of Object.entries(source ?? {})) {
            if (value === undefined) {
                delete merged[key];
            }
            else {
                merged[key] = value;
            }
        }
    }
    return merged;
}
