fix: write_env breaks task's affinity
#1980
+68
−7
Closed