So you have something along these lines? (pseudocode-ish)
met? { ENV["PATH"].contains?("/some/dir") }
meet { write_file_which_sets_path("/etc/profile.d/something") }
I would never expect writing a file to disk to change the ENV of a running process.
Can your `met?` block start a sub-shell which would load /etc/profile.d files and check for the correct $PATH?
It might need to be a login shell…?
— Paul