Skip to content

Commit

Permalink
$mol_build_ensure_git, no pull submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
zerkalica committed Jan 18, 2025
1 parent 5dec846 commit a15957c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 9 additions & 0 deletions build/ensure/git/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ namespace $ {
}

protected override update(dir: string) {
if (this.submodules().has(dir)) {
this.$.$mol_log3_rise({
place: '$mol_build_ensure_git.update()',
message: 'Submodule detected, no git pull',
dir,
})
return false
}

const out = this.$.$mol_run.spawn({
command: 'git rev-parse --abbrev-ref --symbolic-full-name HEAD', dir,
})
Expand Down
5 changes: 0 additions & 5 deletions build/ensure/vcs/vcs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ namespace $ {
@ $mol_action
protected update_safe(dir: string) {
if (this.update_disabled) return false
// Это условие отрубает git pull при соответствующей переменной в env
// Мы против такой функциональности из-за методологии version less https://mol.hyoo.ru/#!section=docs/=19222d_hpubim
// Кому очень надо фиксировать зависимости, могут форкнуть mol и включить этот флаг.
// Но форк будут поддерживать сами.
// if ( this.$.$mol_env()['MOL_BUILD_VSC_UPDATE_DISABLE'] ) return false

try {
return this.$.$mol_file.unwatched(() => this.update(dir), dir)
Expand Down

0 comments on commit a15957c

Please sign in to comment.