Skip to content

Commit

Permalink
Merge pull request #7 from DevboiDesigns/dev
Browse files Browse the repository at this point in the history
fix for data being saved to users desktop
  • Loading branch information
DevboiDesigns authored Dec 13, 2024
2 parents a915855 + 855d8aa commit c19ba9d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules/
# TypeScript cache
.DS_Store
*.tsbuildinfo\
.env
herokutools/
sandbox.*
sandbox.*
env.txt
10 changes: 6 additions & 4 deletions dist/utils/db.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/utils/db.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "herokutools",
"version": "0.2.0",
"version": "0.2.1",
"description": "Heroku CLI wrapper - helpful commands you use often - made easier!",
"main": "dist",
"scripts": {
Expand Down
10 changes: 6 additions & 4 deletions src/utils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import fs from "fs"
import path from "path"

// DB file path
const dirString = "./herokutools"
const fileString = `${dirString}/data.txt`
const dirpath = path.join(process.cwd(), dirString)
const filepath = path.join(process.cwd(), fileString)
const dirString = "./data/"
const fileString = `${dirString}/env.txt`
const dirpath = path.join(__dirname, "..", dirString)
console.log(`DB directory path: ${dirpath}`)
const filepath = path.join(__dirname, "..", fileString)
console.log(`DB file path: ${filepath}`)

export default class DB {
constructor(options: any) {
Expand Down

0 comments on commit c19ba9d

Please sign in to comment.