File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 55[submodule "crates/pgt_query/vendor/libpg_query "]
66 path = crates/pgt_query/vendor/libpg_query
77 url = https://github.com/pganalyze/libpg_query.git
8+ fetchRecurseSubmodules = true
9+ shallow = false
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
3030
3131 if !libpg_query_submodule. join ( ".git" ) . exists ( ) && !libpg_query_submodule. join ( "src" ) . exists ( ) {
3232 return Err (
33- "libpg_query submodule not found. Please run: git submodule update --init --recursive"
33+ "libpg_query submodule not found. Please run: git submodule update --init --recursive && cd crates/pgt_query/vendor/libpg_query && git fetch --tags "
3434 . into ( ) ,
3535 ) ;
3636 }
@@ -53,16 +53,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
5353 current. trim ( ) != target. trim ( )
5454 }
5555 Err ( _) => {
56- // tag not found locally, try fetching
57- let status = Command :: new ( "git" )
58- . args ( [ "fetch" , "--tags" ] )
59- . current_dir ( & libpg_query_submodule)
60- . status ( ) ?;
61-
62- if !status. success ( ) {
63- return Err ( "Failed to fetch tags from libpg_query" . into ( ) ) ;
64- }
65- true
56+ // tag not found locally
57+ return Err ( format ! (
58+ "Tag {} not found in libpg_query submodule. Please run:\n \
59+ cd {} && git fetch --tags && git checkout {} && git checkout {} && git checkout {}",
60+ libpg_query_tag,
61+ libpg_query_submodule. display( ) ,
62+ "15-4.2.4" ,
63+ "16-5.2.0" ,
64+ "17-6.1.0"
65+ )
66+ . into ( ) ) ;
6667 }
6768 } ;
6869
You can’t perform that action at this time.
0 commit comments