Skip to content

Commit

Permalink
fix: possible issue caused by capitalization, duplicate installing
Browse files Browse the repository at this point in the history
  • Loading branch information
vaultec81 committed Jun 9, 2023
1 parent 6106a31 commit 6340f0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/core/components/ipfsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ export class IpfsHandler {
console.log('repoPath', {repoPath, goIpfsPath})
await execa(goIpfsPath, ['init'], {
env: {
IPFS_Path: repoPath,
IPFS_PATH: repoPath,
},
})
for (const key in defaultIpfsConfig) {
const subTree = defaultIpfsConfig[key]
await execa(goIpfsPath, ['config', '--json', key, JSON.stringify(subTree)], {
env: {
IPFS_Path: repoPath,
IPFS_PATH: repoPath,
},
})
}
Expand All @@ -143,7 +143,7 @@ export class IpfsHandler {
['daemon', '--enable-pubsub-experiment', '--enable-gc', '--migrate'],
{
env: {
IPFS_Path: repoPath,
IPFS_PATH: repoPath,
},
},
)
Expand All @@ -168,8 +168,8 @@ export class IpfsHandler {
static async getIpfs() {

let ipfsPath: string
if (process.env.IPFS_Path) {
ipfsPath = process.env.IPFS_Path
if (process.env.IPFS_PATH) {
ipfsPath = process.env.IPFS_PATH
} else {
ipfsPath = Path.join(os.homedir(), '.ipfs-3speak2')
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class CoreService {
}
const output = await execa(ipfsPath, ['version', '-n'])
console.log(output)
if(output.stdout !== "0.16.2") {
if(output.stdout !== "0.19.2") {
console.log('Ipfs not up to date')
throw new Error('Ipfs not up to date')
}
Expand Down

0 comments on commit 6340f0e

Please sign in to comment.