File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -170,14 +170,12 @@ pub fn create_config(
170
170
} ) ?;
171
171
172
172
// we now check if postgrestools is installed inside `node_modules` and if so, we use the schema from there
173
- if VERSION == "0.0.0" {
174
- let schema_path = Path :: new ( "./node_modules/@postgrestools/postgrestools/schema.json" ) ;
175
- let options = OpenOptions :: default ( ) . read ( true ) ;
176
- if fs. open_with_options ( schema_path, options) . is_ok ( ) {
177
- configuration. schema = schema_path. to_str ( ) . map ( String :: from) ;
178
- }
173
+ let schema_path = Path :: new ( "./node_modules/@postgrestools/postgrestools/schema.json" ) ;
174
+ let options = OpenOptions :: default ( ) . read ( true ) ;
175
+ if fs. open_with_options ( schema_path, options) . is_ok ( ) {
176
+ configuration. schema = schema_path. to_str ( ) . map ( String :: from) ;
179
177
} else {
180
- configuration. schema = Some ( format ! ( "https://pgtools.dev/schemas/{VERSION} /schema.json" ) ) ;
178
+ configuration. schema = Some ( "https://pgtools.dev/schemas/latest /schema.json" . to_string ( ) ) ;
181
179
}
182
180
183
181
let contents = serde_json:: to_string_pretty ( & configuration)
You can’t perform that action at this time.
0 commit comments