@tricoteuses/senat 2.20.10 → 2.20.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,13 +116,19 @@ async function copyToSenat(dataset, dataDir, options) {
116
116
  execSync(`${options["sudo"] ? `sudo -u ${options["sudo"]} ` : ""}psql --quiet -d senat -f ${schemaDumpFile}`, {
117
117
  env: process.env,
118
118
  encoding: "utf-8",
119
- stdio: ["ignore", "ignore", "pipe"],
119
+ stdio: ["ignore", "pipe", "pipe"],
120
120
  });
121
121
  }
122
- finally {
123
- try {
122
+ catch (error) {
123
+ if (!options["silent"]) {
124
+ console.error(`Failed to import ${dataset.database} schema:`);
125
+ if (error.stderr) {
126
+ console.error(error.stderr);
127
+ }
128
+ if (error.stdout) {
129
+ console.error(error.stdout);
130
+ }
124
131
  }
125
- catch { }
126
132
  }
127
133
  resolve();
128
134
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tricoteuses/senat",
3
- "version": "2.20.10",
3
+ "version": "2.20.12",
4
4
  "description": "Handle French Sénat's open data",
5
5
  "keywords": [
6
6
  "France",