Skip to content

Commit d0c60b5

Browse files
committed
Fixing dbPath not working with relative path issue #161
1 parent 4269776 commit d0c60b5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ class ServerlessDynamodbLocal {
206206

207207
// otherwise endHandler will be mis-informed
208208
this.options = options;
209+
210+
let dbPath = options.dbPath;
211+
if (dbPath) {
212+
options.dbPath = path.isAbsolute(dbPath) ? dbPath : path.join(this.serverless.config.servicePath, dbPath)
213+
}
214+
209215
if (!options.noStart) {
210216
dynamodbLocal.start(options);
211217
}

0 commit comments

Comments
 (0)