AnDevi
AnDevi

Reputation: 91

Qbs cannot get PWD file on MacOS

I want to use my script as cpp.compilerWrapper: ["../../script"]

I'm using relative path (from my .qbs file) to point the script. It works OK na linux. but on macOS doesn't.

Also when I'm using var path = Environment.getEnv("PWD") on linux return correct path. but on macOS just /.

Anyone haS idea why it doesn't work on macOS or maybe know to get this path in other way ?

Upvotes: 0

Views: 44

Answers (1)

Christian Kandeler
Christian Kandeler

Reputation: 831

It works only by accident. You should not rely on relative paths in that context. Instead, say: cpp.compilerWrapper: [path + "/../../script"]

Upvotes: 1

Related Questions