Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ If you want to override default pure behavior use `--no-pure` flag.
### Override default package store folder

- You may use `--store-folder` flag option to override default location for storing published packages.
- You may use `YALC_STORE_PATH` in system environment to override default location for storing published packages, but it's rank below than `--store-folder`.

### Control output

Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ExecSyncOptions } from 'child_process'
import * as fs from 'fs-extra'
import { homedir } from 'os'
import { join } from 'path'
import { join, resolve } from 'path'

const userHome = homedir()

Expand Down Expand Up @@ -88,3 +88,8 @@ export const writeSignatureFile = (workingDir: string, signature: string) => {
throw e
}
}

if (process.env.YALC_STORE_PATH) {
yalcGlobal.yalcStoreMainDir = resolve(process.env.YALC_STORE_PATH)
console.log('Package store folder(in env) used:', yalcGlobal.yalcStoreMainDir)
}