Skip to content

Commit 1bebf35

Browse files
abeisgoatlaurenzlong
authored andcommitted
Moves to path.posix.join from path.join to fix \ on Windows
1 parent 03e7e56 commit 1bebf35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/providers/firestore.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
// SOFTWARE.
2222

23-
import { join } from 'path';
23+
import { posix } from 'path';
2424
import * as _ from 'lodash';
2525
import * as firebase from 'firebase-admin';
2626
import { apps } from '../apps';
@@ -35,7 +35,7 @@ export const defaultDatabase = '(default)';
3535
let firestoreInstance;
3636

3737
export function database(database: string = defaultDatabase) {
38-
return new DatabaseBuilder(join('projects', process.env.GCLOUD_PROJECT, 'databases', database));
38+
return new DatabaseBuilder(posix.join('projects', process.env.GCLOUD_PROJECT, 'databases', database));
3939
}
4040

4141
export function namespace(namespace: string) {
@@ -51,11 +51,11 @@ export class DatabaseBuilder {
5151
constructor(private resource: string) { }
5252

5353
namespace(namespace: string) {
54-
return new NamespaceBuilder(`${join(this.resource, 'documents')}@${namespace}`);
54+
return new NamespaceBuilder(`${posix.join(this.resource, 'documents')}@${namespace}`);
5555
}
5656

5757
document(path: string) {
58-
return (new NamespaceBuilder(join(this.resource, 'documents'))).document(path);
58+
return (new NamespaceBuilder(posix.join(this.resource, 'documents'))).document(path);
5959
}
6060
}
6161

@@ -64,7 +64,7 @@ export class NamespaceBuilder {
6464
constructor(private resource: string) { }
6565

6666
document(path: string) {
67-
return new DocumentBuilder(join(this.resource, path));
67+
return new DocumentBuilder(posix.join(this.resource, path));
6868
}
6969
}
7070

0 commit comments

Comments
 (0)