mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-04-01 02:42:23 -05:00
log 'new packages directory' message at a warn level
This commit is contained in:
parent
b2f6128e9c
commit
15d46e3280
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@ var fs = require('fs')
|
|||
, fsExt = require('fs-ext')
|
||||
, Path = require('path')
|
||||
, mystreams = require('./streams')
|
||||
, Logger = require('./logger')
|
||||
, FSError = require('./error').FSError
|
||||
|
||||
function make_directories(dest, cb) {
|
||||
|
@ -159,9 +160,10 @@ function lock_and_read(name, callback) {
|
|||
|
||||
function Storage(path) {
|
||||
this.path = path
|
||||
this.logger = Logger.logger.child({sub: 'fs'})
|
||||
try {
|
||||
fs.mkdirSync(path)
|
||||
console.log('created new packages directory: ', path)
|
||||
this.logger.warn({path: path}, 'created new packages directory: @{path}')
|
||||
} catch(err) {
|
||||
if (err.code !== 'EEXIST') throw new Error(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue