Skip to content

Commit

Permalink
Update pyxform installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Aug 22, 2017
1 parent d80f88d commit 551548c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/cli/xls2xform-installation-command.json

This file was deleted.

8 changes: 7 additions & 1 deletion src/lib/convert-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const trace = require('../lib/log').trace;
const warn = require('../lib/log').warn;

const XLS2XFORM = 'xls2xform-medic';
const INSTALLATION_INSTRUCTIONS = `\nE To install, try one of the following:
E
E Ubuntu
E sudo python -m pip install git+https://github.com/medic/pyxform.git@master#egg=pyxform-medic
E OSX
E pip install git+https://github.com/medic/pyxform.git@master#egg=pyxform-medic`;

module.exports = (projectDir, subDirectory, options) => {
if(!options) options = {};
Expand Down Expand Up @@ -47,7 +53,7 @@ const xls2xform = (sourcePath, targetPath) =>
exec(XLS2XFORM, sourcePath, targetPath)
.catch(e => {
if(executableAvailable()) throw e;
else throw new Error('There was a problem executing xls2xform. It may not be installed. To install, run ' + require('../cli/xls2xform-installation-command'));
else throw new Error('There was a problem executing xls2xform. It may not be installed.' + INSTALLATION_INSTRUCTIONS);
});

// FIXME here we fix the form content in arcane ways. Seeing as we have out own
Expand Down

0 comments on commit 551548c

Please sign in to comment.