If creds dont exist - create in flows dir rather than userdir

So they stay alongside flows
This commit is contained in:
Dave Conway-Jones 2024-11-11 16:26:20 +00:00
parent 1d9586721e
commit fd4f747706
No known key found for this signature in database
GPG Key ID: 1DDB0E91A28C2643

View File

@ -85,7 +85,10 @@ function init(_settings, _runtime) {
var ffBase = fspath.basename(flowsFullPath,ffExt);
flowsFileBackup = getBackupFilename(flowsFullPath);
credentialsFile = fspath.join(settings.userDir,ffBase+"_cred"+ffExt);
credentialsFile = fspath.join(settings.userDir,ffBase+"_cred"+ffExt); // if creds file exists in "old" location use
if (!fs.existsSync(credentialsFile)) { // if not then locate it next to flows file in user dir
credentialsFile = fspath.join(fspath.dirname(flowsFullPath), ffBase+"_cred"+ffExt);
}
credentialsFileBackup = getBackupFilename(credentialsFile)
var setupProjectsPromise;