When the temp folder is not given by the user, it was added by this repo. But it was create after config.main.paths values. https://github.com/trailsjs/trailpack-core/blob/master/index.js#L47
That's mean if I have :
paths: {
root: process.cwd(),
www: path.resolve(process.cwd(), '.tmp', 'public')
}
This will crash because core try to first create www path and then temp path so a Error: ENOENT: no such file or directory, mkdir '/.tmp/public'
But if now I change and set this :
paths: {
root: process.cwd(),
temp: path.resolve(process.cwd(), '.tmp'),
www: path.resolve(process.cwd(), '.tmp', 'public')
}
All is working because temp is create before www.
My opinion is if temp, socket and log are added by core so they have to be create first.
When the
tempfolder is not given by the user, it was added by this repo. But it was create afterconfig.main.pathsvalues. https://github.com/trailsjs/trailpack-core/blob/master/index.js#L47That's mean if I have :
This will crash because
coretry to first createwwwpath and thentemppath so aError: ENOENT: no such file or directory, mkdir '/.tmp/public'But if now I change and set this :
All is working because
tempis create beforewww.My opinion is if
temp,socketandlogare added bycoreso they have to be create first.