os: deprecate os.getwd in favor of os.get_current_dir (part 1) (#22966)

This commit is contained in:
Elsie 2024-11-25 05:17:33 -05:00 committed by GitHub
parent 94905820e6
commit 93009823f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 60 additions and 46 deletions

View file

@ -370,7 +370,7 @@ pub fn (mut ts TestSession) add(file string) {
pub fn (mut ts TestSession) test() {
// Ensure that .tmp.c files generated from compiling _test.v files,
// are easy to delete at the end, *without* affecting the existing ones.
current_wd := os.getwd()
current_wd := os.get_current_dir()
if current_wd == os.wd_at_startup && current_wd == ts.vroot {
ts.root_relative = true
}